How do I slide cancel...

This forum is currently in read-only mode.
  • In my current project, I have the ability to slide in place, when you hold down and press the jump key (I'm using platform behaviour) the player has control removed and is moved, with an automated system, a set distance. At any point, however, the player needs to be able to hit the jump key again to jump straight up, cancelling the slide altogether. I've got everything working, except one thing. For whatever reason, Construct seems to like to see the first single Jump press as a trigger for both the slide and the cancel, thus holding down and pressing jump makes the player jump... But it only does this the first time, when down and jump are pressed again, the player slides properly. However, if the slide is left to finish on its own, then the next time the player goes to slide, they'll jump first and have to trigger the slide again, but if the player cancels the slide, then they will slide properly the next time on the first try. I've spent 3 days trying to work this out and have gotten no where, any help would be GREATLY appreciated lol.

  • Try something like this if you have not already

    Player holds down - pv to 1

    pv is 1 + player presses jump - slide

                                 - pv to 2

    pv is 2 + player presses jump - cancel slide

                                 - pv to 0

    #player holds down - pv to 0(this line is inverted)

  • been there, done that I'm afraid

  • so you're saying I need to make the slide cancel and the slide init the same event... brilliant! I'll give it a try, thanks R0J0

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • so the only problems now, are that if the player presses shift to cancel while still holding down, then the slide is started over, extending it for as long as the player wants. The only way to truly cancel the slide is to press jump by itself, and unfortunately this is wrong as this is a fan game that is emulating a pre-existing engine. Any ideas?

  • A way to fix it would be to only set the slide time if the player is not already sliding.

  • SOLVED!!!! Good GOD THANK YOU!!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)