I don't know why this trigger isn't working
The idea of the trigger is that when a unit comes near the trap (the trap attack the unit) it waits a second and then launch all the units in a radius of 64 very high and remove them from the map.
-
Part 1
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Unit-type of (Attacking unit)) Equal to Trap
-
-
Actions
-
Set Index = (Index + 1)
-
Set TrapUnits[Index] = (Units in No region)
-
Wait 1.00 game-time seconds
-
Set TrapUnitsInRange[Index] = (Units within 64.00 of (Position of (Attacking unit)))
-
Unit Group - Pick every unit in TrapUnitsInRange[Index] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A ground unit) Equal to True
-
((Picked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
-
-
Then - Actions
-
Unit Group - Add (Picked unit) to TrapUnits[Index]
-
-
Else - Actions
-
-
-
-
Trigger - Turn on Part 2 <gen>
-
Trigger - Turn on Part 3 <gen>
-
-
-
Part 2
-
Events
-
Time - Elapsed game time is 1.10 seconds
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in TrapUnits[Index] and do (Actions)
-
Loop - Actions
-
Unit - Pause (Picked unit)
-
Unit - Add Crow Form to (Picked unit)
-
Unit - Remove Crow Form from (Picked unit)
-
Animation - Change (Picked unit) flying height to 2000.00 at 2000.00
-
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
-
-
-
-
-
Part 3
-
Events
-
Time - Elapsed game time is 1.50 seconds
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in TrapUnits[Index] and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
-
-
-
The idea of the trigger is that when a unit comes near the trap (the trap attack the unit) it waits a second and then launch all the units in a radius of 64 very high and remove them from the map.