Player platformer attack and don't move

Hi! I’m building a platformer, but I have an issue.
When my player attack I want that on key press, but only one press, not long press, he do the attack.
Now when I press attack and release the button, the animation stops. Or, when I keypress and not release, the animation and the attack continue.
I want that when I press attack the animation start and finish with all behaviors of attack.
Also, when I’m moving and play attack, I want that my player stops and do the attack.

Thanks everybody!

my config and a little preview on reply


As already said by another member of this forum, it 's truly curious that numerous GD’s users forget to use the condition “Trigger once”!
I also think the wiki must insist more and more to use this condition.

1 Like

@Amigo54 thank you, now it go one time, but still don’t complete all the animation if I stop the key pressing.


Try “Key is released” and not “Key is pressed”

@Amigo54 with key released the attack will not start until key release, it’s unplayable like this