[Solved] Problems with attack animation

I was creating a character that had an animation in which he uses a sword, the problem would be that I don’t know how to make that when the attack animation ends, it switches to the standing animation. Could you help me?

There is an option in the events that says “Animation finished”, you can use that.

Also, when you press the key or the button to do the attack, put in the conditions “If (that button) pressed” and in the action “Play animation”, remember to add “Trigger once”, so the animation won´t repeat.

ok I already did that and it worked for me, the bad thing is that only the first frame is reproduced and the others do not

Are all the frames of the animation in one animation?

Maybe you put the frames on different animations…

Do you have something like this?

Yes, I have been doing the thing of putting each frame in a different animation, I don’t know if this is the way the events are


Okay. Now give the animation a name. Like “Attack”.

When you press the P key. The action should be;

Change animation by name to “Attack”.

Remember to write the animations exactly the same. So it works.

If you still want to use numbers. The animations, before the slot were you put their names, they have a number. That is the one you should use.

Each animation has its own number. Not the frames.

1 Like

supposedly it should work right?

Takes this as an example:

Each animation has a number. You don’t put the frame of the animation. You put the animation you want to play. Without the numbers of each frame.

1 Like

I would say is fine. Just the first part.

Try to delete the sub events. And keep just the one that says:

P key is pressed // trigger once << and >> set animation of player to “Attack”.

Thanks for your help, I already solved it and I saw that the problem was with the walking events, so I added the condition of “the p key is not pressed”

1 Like