Download

How can I set up Player Character plays a Knock-back Animation when taking Damage?

Hi, this is my first post on a forum, so bear with me if I don’t get how things work straight away but as the title question implies, I’m try to set up a knock-back animation to play every time my player character takes damage. Unfortunately, when I do this, after taking damage from an enemy it just stays in the knock-back animation pose, gliding about the level instead of acting how it did before.

I set up the animation to play when I get hit in the AI enemy’s BP -The section where it is programmed to attack my player. So maybe this is the issue? I tried to set it up so it as a more “universal” way linked to the player character that will apply to all damage received rather than having to put the information into every enemy or assets that cause damage to the player but I could not get it to work properly.

I have also set up a state machine in the AnimGraph but this still has made no difference. Could someone please shed some light on my problem? Thanks in advance.

Can you give us a screenshot of your Anim BP? It sounds like the Knockback animation node is linked to, in a one-way fashion, so it can’t get back to the normal pose, once it has finished playing the knockback animation. This could be because you haven’t given it a return arrow, or the knockback boolean isn’t being set back to false (or whatever method you are using to trigger the knockback animation).