Having a bit of trouble with key is down, key is pressed, for example when i only press the key i want the character to do one step with "step animation", but when i hold the same key i want the character to run with "run animation".
What happens is that i press the key but he just does the "run animation". How do I solve this?
thanks in advance :)
Develop games in your browser. Powerful, performant & highly capable.
You can do something like this:
On Right key pressed -> Player start "Step" animation
On animation "Step" ended
Keyboard Right key is down -> Player start "Run" animation
else - > Player start "Idle" animation