Hello! this is my first post here, so sorry if I don't get it right.
I am trying to create a trigger that enables a knock back effect when a unit walks into a radius around the same unit type (in this case a tornado dummy with wander passive) regardless of how that unit came into play (Placed in editor, created with a trigger, etc) To do this, I used a 3 step trigger queue
First, it picks all "Dummy Tornadoes" in the playable map area, and sets some variables
Second, a trigger is in place that "turns on" another trigger when a unit comes within x range of any tornado
Third, trigger that "Turns on" is basically an effect that knocks back all units and turns off after .50 seconds
First Trigger
I am trying to create a trigger that enables a knock back effect when a unit walks into a radius around the same unit type (in this case a tornado dummy with wander passive) regardless of how that unit came into play (Placed in editor, created with a trigger, etc) To do this, I used a 3 step trigger queue
First, it picks all "Dummy Tornadoes" in the playable map area, and sets some variables
Second, a trigger is in place that "turns on" another trigger when a unit comes within x range of any tornado
Third, trigger that "Turns on" is basically an effect that knocks back all units and turns off after .50 seconds
First Trigger
-
Pick Tornado
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units of type Dummy Tornado) and do (Actions)
-
Loop - Actions
-
Set Tornado = (Picked unit)
-
Set TornadoGroup = (Units within 200.00 of (Position of (Picked unit)))
-
Set TornadoOrigin = (Position of (Picked unit))
-
-
-
-
-
Tornado Active
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
(Number of units in (Units within 200.00 of (Position of Tornado))) Greater than or equal to 1
-
-
Actions
-
Special Effect - Create a special effect attached to the chest of (Matching unit) using Abilities\Spells\Other\Tornado\Tornado_Target.mdl
-
Trigger - Turn on Tornado Knockback Effect <gen>
-
Wait 0.80 seconds
-
Trigger - Turn off Tornado Knockback Effect <gen>
-
-
-
Tornado Knockback Effect
-
Events
-
Time - Every 0.02 seconds of game time
-
-
Conditions
-
Actions
-
Set Tempgroup = (Units within 400.00 of (Position of Tornado))
-
Unit Group - Pick every unit in Tempgroup and do (Actions)
-
Loop - Actions
-
Set tornadovictimpos = (Position of (Picked unit))
-
Set TornadoPos = (Position of Tornado)
-
Unit - Move (Picked unit) instantly to (tornadovictimpos offset by 20.00 towards (Angle from TornadoPos to tornadovictimpos) degrees)
-
Custom script: call RemoveLocation (udg_TornadoPos)
-
Custom script: call RemoveLocation (udg_tornadovictimpos)
-
Custom script: call DestroyGroup (udg_Tempgroup)
-
-
-
-
Last edited: