How do I create a dash/dodge move?

0 favourites
  • 2 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Fairly simple question that might end up having a complex answer, I dunno for sure. I'm looking to create a dash effect for my game a la Mega Man X, but with the player unable to change their direction of movement while dashing. Ideally, what I would like is for the player to speed up when the dash button is tapped while moving in a direction; the player moves at an accelerated pace in that direction for a split second (unable to turn around), and then goes back to their default movement speed. The trouble is, I don't know how to do any part of that. Help would be appreciated!

    edit:

    I managed to bumble into creating a dash move successfully, my code is... more than a bit messy, but this works as a starting point. Now that I've done that, how do I make it so the player cannot turn left while dashing right, etc? I've tried ignoring player input and simulating the control when the player is in the "dashing" state, but that just stops them in their tracks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just an update on the situation, I have figured it out, I think.

    This works just as I'd like it to! However, if there is a better or more efficient way to do it, feel free to share it here. I'd like to cut down on the clutter if at all possible.

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