So I recently discovered the method of removing leaks from actions and such, but I have a question that I want to ask the more experienced JASSers:
I have this leak-fixed trigger:
What I'm wondering is suppose I have many other similar triggers, but running on a different periodic timer - say one every 1, 5, and 10 seconds. At every 10 seconds of game time they are all going to fire at exactly the same moment. If thats the case, wouldnt using a global variable (Temp_Group) malfunction in some way since it can't be a temporary group for all the periodic events at the same time?
I have this leak-fixed trigger:
Trigger:
- Trapping
- Events
- Time - Every 5.00 seconds of game time
- Conditions
- Actions
- Set Temp_Group = (Units owned by Player 1 (Red) of type Unfathomable Trap)
- Unit Group - Pick every unit in Temp_Group and do (Actions)
- Loop - Actions
- Unit - Cause (Picked unit) to damage (Random unit from (Units within 800.00 of (Position of (Picked unit)) matching (((Owner of (Matching unit)) is in GoodForce) Equal to True))), dealing 1000000000.00 damage of attack type Chaos and damage type Normal
- Loop - Actions
- Custom script: call DestroyGroup( udg_Temp_Group)
- Events
What I'm wondering is suppose I have many other similar triggers, but running on a different periodic timer - say one every 1, 5, and 10 seconds. At every 10 seconds of game time they are all going to fire at exactly the same moment. If thats the case, wouldnt using a global variable (Temp_Group) malfunction in some way since it can't be a temporary group for all the periodic events at the same time?