Dash like on Mega Man X

  • Hey guys,

    I would like for my character to dash like on the mega man x games. It looks as if he is done when he completes his dash, but if you press jump soon after he is finished dashing he will jump with all of the momentum of a "dash jump". I can't quite get this.

    "WASD" to move and "shift" to dash.

    dropbox.com/s/2h81lhsa2ux8y2v/Test2.capx

  • Dash jump works perfectly for me. Your code is right, checking to see if "jumping" is playing and if it is, setting platform speed to 600.

    I'd just suggest that you check to see if the player is in air before allowing the dash, otherwise he can "jump dash" (not the same as dash jumping) while in the air, which just looks weird.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Perhaps I worded what I am asking incorrectly.

    I have no problem with him jumping after dashing and he has all the momentum, which is great. My problem is when he stops his dash and you press jump right after he will perform a dash jump when he shouldn't, because he is actually done with the dash.

    Does that clear things up at all?

  • Try making an boolean instance variable on your Player object (Sprite) called Dashing, set it to "false".

    The logic is something like this:

    1) If Player is on the floor and Dashing is false, set (normal acceleration, velocity etc atributes)

    2) If Player is on the floor and pressing Dash Button, set Dashing to true.

    3) If Dashing is true, set (dash atributes)

    There's a lot more to it but this are the basics I believe.

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