sentrywiz
S
sentrywiz
Hi. I'm trying to spin a unit from 0 - 45 degrees in a loop. I have all the stuff, and the trigger works for a unit that is already created. But for a new unit that is being created via trigger, it doesn't work and I can't see why.
Triggers:
Thank you for reading!
Triggers:
-
Spawn Item
-

Events
-


Time - Every 5.00 seconds of game time
-
-

Conditions
-

Actions
-


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



If - Conditions
-




(Hammer Spawn <gen> contains hammer_created) Not equal to True
-




hammer_created Equal to No unit
-
-



Then - Actions
-




Set item_loc = (Center of Hammer Spawn <gen>)
-




Unit - Create 1 Sledge for Neutral Passive at item_loc facing 0.00 degrees
-




Set hammer_created = (Last created unit)
-




Custom script: call RemoveLocation ( udg_item_loc )
-
-



Else - Actions
-
-
-
-
Spin Items
-

Events
-


Time - Every 0.10 seconds of game time
-
-

Conditions
-


hammer_created Not equal to No unit
-
-

Actions
-


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



If - Conditions
-




turn_ctr Equal to 0.00
-
-



Then - Actions
-




Set spin_wep = True
-
-



Else - Actions
-




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





If - Conditions
-






turn_ctr Equal to 45.00
-
-





Then - Actions
-






Set spin_wep = False
-
-





Else - Actions
-
-
-
-


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



If - Conditions
-




spin_wep Equal to True
-
-



Then - Actions
-




Set turn_ctr = (turn_ctr + 1.00)
-
-



Else - Actions
-




Set turn_ctr = (turn_ctr - 1.00)
-
-
-


Unit - Make hammer_created face turn_ctr over 0.10 seconds
-
-
Thank you for reading!






