- Joined
- Dec 5, 2009
- Messages
- 846
Hey there! In this trigger all units in a unit group will be damaged over 10 sec.
But when the effect is over the groups should be cleared, however if 2 instances or more are running then it will be hard to clear the groups because the targets are all in one group. I wonder if there's a way to separate units in groups or something like that. Here's my trigger.
But when the effect is over the groups should be cleared, however if 2 instances or more are running then it will be hard to clear the groups because the targets are all in one group. I wonder if there's a way to separate units in groups or something like that. Here's my trigger.
-
Firebolt Burn
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Firebolt_Group2 and do (Actions)
-
Loop - Actions
- Set Firebolt_u2 = (Picked unit)
- Set Firebolt_Index = (Custom value of Firebolt_u2)
- Unit - Hide Firebolt_u2
- Set Firebolt_u4[Firebolt_Index] = Firebolt_u2
- Set Firebolt_BurnDuration[Firebolt_Index] = (Firebolt_BurnDuration[Firebolt_Index] - 1.00)
-
Unit Group - Pick every unit in Firebolt_Group3 and do (Actions)
-
Loop - Actions
- Set Firebolt_u3 = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Firebolt_u3 is alive) Equal to True
-
Then - Actions
- Special Effect - Create a special effect attached to the overhead of Firebolt_u3 using Firebolt_Beffect[Firebolt_Index]
- Special Effect - Destroy (Last created special effect)
- Unit - Cause Firebolt_u2 to damage Firebolt_u3, dealing Firebolt_BurnDamage[Firebolt_Index] damage of attack type Spells and damage type Normal
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Firebolt_BurnDuration[Firebolt_Index] Less than or equal to 0.00
-
Then - Actions
- Unit Group - Remove Firebolt_u2 from Firebolt_Group2
- Unit Group - Remove Firebolt_u3 from Firebolt_Group3
- Unit - Remove Firebolt_u2 from the game
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Firebolt_Group2 is empty) Equal to True) and ((Firebolt_Group3 is empty) Equal to True)
-
Then - Actions
- Trigger - Turn off Firebolt Burn <gen>
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in Firebolt_Group2 and do (Actions)
-
Events
- Unit Group - Remove Firebolt_u3 from Firebolt_Group3