Leap

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?

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))))]
 

Ninja_sheep

Heavy is credit to team!
Reaction score
64
You can change the movement type to flying. Then it works. But this is little complicate. You have to make your hero cast the hawk-form spell, then move it and then let it switch back in normal form.
 

kallieblakie

New Member
Reaction score
5
You can change the movement type to flying. Then it works. But this is little complicate. You have to make your hero cast the hawk-form spell, then move it and then let it switch back in normal form.
eh? that would have to let the animation of morphing load, etc etc. can i do it in triggerS? any idea how dota does it?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
you didn't tell us what happens instead of the leaping to the cliffs....
tell us what happens when it doesn't work....
it helps us finding the cause for the problem
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top