hey guys, im currently trying to make a stun aura, so stuns the units in the aura's effect every X seconds. this is wat i have so far, wat am i doing wrong and wat should my code be?
Time - Every 5.00 seconds of game time
If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Unit-type of (Casting unit)) Equal to Lynsor ((Picked unit) has buff Intensify ) Equal to True (Ability being cast) Equal to Intensify Then - Actions Unit - Create 1 Intensify Dummy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Position of (Picked unit)) Set IntensifyDummy = (Unit-type of (Last created unit)) Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Triggering unit) Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Well first off if you have a condition involving *Picked Unit* then you must have an actual pick unit function, and then at one point you have *Triggering Unit*, this is only used if the event is triggered by a unit doing something(entering region, casting spell, reaching certain life). If you have an aura that stuns all nearby I suggest making the dummy cast a Warstomp spell instead of targeting each unit individually. This way you can just do:
--Create 1 Stomper at position of (hero) --Add a 2 second generic expiration timer to last created unit --Order last created unit to Tauren-Tauren Chieftain Warstomp