• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Crash] Best way to remove trigger conditions from within evaluated trigger

Status
Not open for further replies.
I really want to avoid a loop for this.

Any ideas?


This is for a timer system. When the timer expires, the trigger is evaluated for all of the code on it. If that timer was previous paused, then it moves to a different trigger on a resume call (within the trigger evaluation). If it is destroyed, it is removed from the trigger.


So what would be the best way to do this you think? The only way I can think of atm is a stack D: and a destroyed timer stack (they can't be recycled until they are removed from the trigger), which would incur a bit of extra overhead. I really want to avoid a loop if at all possible.


Another note. Trigger executes can't be used as they'd slow the resource down much more than a loop would.


If I can just solve this problem w/o a loop, this timer system will be way faster than regular timers : D.



Also, clearing the triggers conditions and then building it up is also a bad idea... that would be insanely slow, slower than looping through destroyed/moving timers.
 
Status
Not open for further replies.
Top