Thread: GroupUtils
View Single Post
Old 02-03-2015, 06:37 PM   #134
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

As long as function A doesn't execute function B while it is using the group, things will work okay - A will only resume running after B completes (or hits a TriggerSleepAction).

The tricky part are events. Any triggers that responds to things like damage or death events shouldn't use the same group as loops that can cause those events. To be safe, I'd use NewGroup/ReleaseGroup instead of a static group for all loops except those where the thread was started by a timer expiring... or the opposite, use a static group only for loops that don't do anything that could run another trigger.

So, either use a static group only for loops that can't interrupt anything or only for loops that can't be interrupted.
__________________
Anitarf is offline   Reply With Quote