- Joined
- Jan 30, 2012
- Messages
- 1,297
what's wrong with this TRIGGER?
when unit cast shoot the dummy move into center of the map
-
Shoot
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Shoot
-
-

Actions
-


Set Max_Index = (Max_Index + 1)
-


Set ShootCaster[Max_Index] = (Triggering unit)
-


Set Point[1] = (Position of ShootCaster[Max_Index])
-


Set Point[2] = (Target point of ability being cast)
-


Unit - Create 1 BulletDummy for (Owner of ShootCaster[Max_Index]) at Point[1] facing (Angle from Point[1] to Point[2]) degrees
-


Set ShootDummy[Max_Index] = (Last created unit)
-


Unit - Add a 0.60 second Generic expiration timer to ShootDummy[Max_Index]
-


Animation - Play ShootDummy[Max_Index]'s birth animation
-


Custom script: call RemoveLocation(udg_Point[1])
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Max_Index Equal to 1
-
-



Then - Actions
-




Trigger - Turn on Shoot Loop <gen>
-
-



Else - Actions
-
-
-
-
Shoot Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer Current_Index) from 1 to Max_Index, do (Actions)
-



Loop - Actions
-




Set Point[3] = (Position of ShootDummy[Current_Index])
-




Set ShootAngle[Current_Index] = (Angle from Point[3] to Point[2])
-




Set Point[4] = (Point[3] offset by 50.00 towards (Angle from Point[3] to Point[2]) degrees)
-




Unit - Move ShootDummy[Current_Index] instantly to Point[4]
-




Set ShootGroup[Current_Index] = (Units within 200.00 of Point[3] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of ShootCaster[Current_Index])) Equal to True)))
-




Unit Group - Pick every unit in ShootGroup[Current_Index] and do (Actions)
-





Loop - Actions
-






Unit - Kill ShootDummy[Current_Index]
-






Unit - Cause ShootCaster[Current_Index] to damage (Picked unit), dealing 25.00 damage of attack type Hero and damage type Normal
-
-
-




Custom script: call DestroyGroup(udg_ShootGroup[udg_Current_Index])
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(ShootDummy[Current_Index] is dead) Equal to True
-
-





Then - Actions
-






Set ShootAngle[Current_Index] = ShootAngle[Max_Index]
-






Set ShootAngle[Max_Index] = 0.00
-






Set ShootDistance = 0.00
-






Set ShootCaster[Current_Index] = ShootCaster[Max_Index]
-






Set ShootCaster[Max_Index] = No unit
-






Set ShootDummy[Current_Index] = ShootDummy[Max_Index]
-






Set ShootDummy[Max_Index] = No unit
-






Set Current_Index = (Current_Index - 1)
-






Set Max_Index = (Max_Index - 1)
-
-





Else - Actions
-
-




Custom script: call RemoveLocation(udg_Point[1])
-




Custom script: call RemoveLocation(udg_Point[2])
-




Custom script: call RemoveLocation(udg_Point[3])
-
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Max_Index Equal to 0
-
-



Then - Actions
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-
-
-
