I want to do fighter style game and want to know how to make a key combos result in an animation or attack a la Street Fighter, Tekken, Mortal Kombat etc. For example, how do you do: -Street Fighter Ruy's fireball (Down, Down + Forward, Forward, Punch)? -Street Fighter Guile's sonic boom (press Back for 2 seconds, then Forward, Punch) -Mortal Kombat Liu Kang's Flying Dragon Kick (Forward, Forward, Kick) I think with these three different examples explained you could make any keyboard combo. A tutorial would be really helpful as I haven't come across any regarding this topic. Thanks in advance!
How do you make input/keyboard combinations?
6 days later
I'm not completly sure but maybe you are looking for something like a "state-machine". This is a very common topic in programming. In most games this just handles if the player is just walking, running, falling, etc. But I think this could also be used to get what you want to achieve.
This would need that you config different states (the begin of each combo linked to the needed key) and and if-state handles how the state-machine progress the player motion step by step. An timer resets everything if there was a wrong or not done key-input.
Maybe this helps! :)
4 years later
Megalomaniak added the Godot Help tag .