Attack And Move at the same time

Hello, i’m new to GD 5 sorry if my question is dumb.
I can’t beat this problem. When left button is pressed and i try to press “attack button” the animation don’t change to “attack animation”. I feel the program priorities the left button. If my player is not move or is jumping or falling the attack work.
I have behavior type Platformer On. So i want to move and attack at the same time or if i move left or right i want when i press “Attack” to change the animation.
Please help.

Change to the idle and run animations only if you aren’t attacking, for example when walking right:

Conditions: Right key is pressed Animation of Pesho is NOT "attack" Actions: Set animation of Pesho to "run" Flip horizontally Pesho : yes
In case you want to flip while attacking, it would be:

[code]Conditions: Right key is pressed
Actions: Flip horizontally Pesho : yes

// sub-event
Conditions: Animation of Pesho is NOT "attack"
Actions: Set animation of Pesho to "run"[/code]
1 Like

OMG dude it work flawlessly, thanks a lot u are the best. Now the game feel so good to attack