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.