Key Combinations for special moves in Beat Em Up game?

Hi, how do I do key combinations so that I can execute special moves in a beat em up game?

For example…
A) Press right arrow key, right arrow key (2 right arrow keys in quick succession) to make character go into running mode
B) Press down arrow, then up arrow, to do a leaping uppercut.
C) Press S, D, S to do another special move. etc…

Basically… how do we combine commonly used keys in the game to trigger different animations?

Use timers.

If right is pressed, start a timer.
If right is pressed and timer < 0.2, do that.

Ah ok thanks Gruk. I thought it might have something to do with timers but wasn’t sure.

1 Like