kallieblakie
New Member
- Reaction score
- 5
Hi, I'm trying to recreate PotM's skill, Leap, from dota. In case you don't know how it looks like, it's pretty much like a unit jumping forward, with increasing flying height, then decreasing flying height. But now I have a problem with it crossing terrains.
The skill works perfectly fine on straight ground, but it doesnt work when it tries to leap into a cliff or leap off a cliff. any idea what may cause this?
The skill works perfectly fine on straight ground, but it doesnt work when it tries to leap into a cliff or leap off a cliff. any idea what may cause this?
Code:
Leap Periodic Up
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 1, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
LeapCurrentDistance[(Integer A)] Less than or equal to (LeapDistance[(Integer A)] / 2.00)
Then - Actions
Set LeapPosition[(Integer A)] = (Position of Player[(Integer A)])
Set LeapPosition2[(Integer A)] = (LeapPosition[(Integer A)] offset by LeapSpeed towards LeapAngle[(Integer A)] degrees)
Custom script: call RemoveLocation (udg_LeapPosition[bj_forLoopAIndex])
Unit - Move Player[(Integer A)] instantly to LeapPosition2[(Integer A)], facing LeapAngle[(Integer A)] degrees
Set LeapCurrentDistance[(Integer A)] = (LeapCurrentDistance[(Integer A)] + LeapSpeed)
Custom script: call RemoveLocation (udg_LeapPosition2[bj_forLoopAIndex])
Else - Actions
Trigger - Turn off (This trigger)
Trigger - Turn on Leap Periodic Down <gen>
Animation - Change Player[(Player number of (Player((Integer A))))] flying height to 0.00 at LeapDistance[(Player number of (Player((Integer A))))]