I'm trying to create a skill where the hero charges in a straight line (it is a target point ability), moving at super fast speed, dealing damage and stunning every unit in his line. The charge will advance up to a distance of 1400 unless the user cancels it by giving an order. It can keep going (surpassing the 1400 distance) if the unit is on a cliff at that moment (a unique square region in my map, so it is easily detectable). No unit can go over a cliff except for this unit while executing this ability (because I will turn off collisions).
The problem is that I encounter (maybe a bug?) an unexpected behavior where the unit turns backwards at some point while the trigger "running" move the unit. It doesn't occur always at the same point; it seems to be some kind of random behavior.
Sadly, I can't keep trying anything until I resolve this. Maybe I'm approaching this the wrong way. Any help, please?
The problem is that I encounter (maybe a bug?) an unexpected behavior where the unit turns backwards at some point while the trigger "running" move the unit. It doesn't occur always at the same point; it seems to be some kind of random behavior.
Sadly, I can't keep trying anything until I resolve this. Maybe I'm approaching this the wrong way. Any help, please?
-
onslaught starts
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
Actions
-
Set Magna = (Triggering unit)
-
Set Point_A = (Position of (Triggering unit))
-
Set Point_B = (Target point of ability being cast)
-
Set Angle = (Angle from Point_A to Point_B)
-
Set final_destination = (Point_A offset by 1400.00 towards Angle degrees)
-
Wait 1.00 seconds
-
Unit - Turn collision for Magna Off
-
Animation - Change Magna's animation speed to 200.00% of its original speed
-
Unit - Order Magna to Move To final_destination
-
Trigger - Turn on running <gen>
-
Wait 4.00 seconds
-
Animation - Change Magna's animation speed to 100.00% of its original speed
-
Unit - Turn collision for Magna On
-
Trigger - Turn off running <gen>
-
-
-
running
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
Custom script: call SetUnitX( udg_Magna , GetLocationX(GetUnitLoc( udg_Magna )) + 10 )
-
-