[DiscordArchive] Just put check in for specific ids and spawn the dummy?
[DiscordArchive] Just put check in for specific ids and spawn the dummy?
Archived author: Clotic • Posted: 2022-05-30T19:32:01.751000+00:00
Original source
Just put check in for specific ids and spawn the dummy?
Archived author: Clotic • Posted: 2022-05-30T19:32:41.602000+00:00
Original source
Assume that's what u wanna do or if u wanna do all creatures then do all creatures in range 9999999
Archived author: Foe • Posted: 2022-05-30T19:32:48.677000+00:00
Original source
Yes, but you can flag the bosses as active
Archived author: Foe • Posted: 2022-05-30T19:32:57.843000+00:00
Original source
that way they don't unload
Archived author: Honey • Posted: 2022-05-30T19:34:53.689000+00:00
Original source
Hmm i would check for
- nil doing nothing
- IsInCombat() starting a timer
- IsDead() ending the timer and removing the entry from the list to check for this instance id
Archived author: Honey • Posted: 2022-05-30T19:35:17.955000+00:00
Original source
Don't think i need states or make sure it stays loaded for that
Archived author: Foe • Posted: 2022-05-30T19:38:15.142000+00:00
Original source
in the generic loop you just check if the creature is dead, if it is, then you don't have to check whether it's in combat or not
Archived author: Honey • Posted: 2022-05-30T19:39:27.913000+00:00
Original source
i think i need it to start the combat timer. I aim at knowing encounter durations, sorry should've said that.
Archived author: Foe • Posted: 2022-05-30T19:45:53.845000+00:00
Original source
```Lua
local function CheckBossStatus()
local boss; -- lets assume we have already fetched the boss object
local timerStart = nil; -- instantiate timer as nil
local timerEnd = nil;
if(boss and not boss:IsDead()) then -- Boss exists and isn't dead
if(boss:IsInCombat() and not timerStart) then -- the boss is in combat and timer is not instantiated
timerStart = os.time() -- instantiate timer as current unix time
end
else -- boss does not exist or is dead
if(timerStart) then -- start timer has been instantiated
timerEnd = os.time()
end
end
if(timerStart and timerEnd) then
-- you can do stuff with start and end timer here
end
end```
Archived author: Foe • Posted: 2022-05-30T19:46:14.759000+00:00
Original source
Very pseudo-code, obviously would need better storage of timers and instance etc