Stop my AI from playing the death animation twice?

HI Team

I have exhausted every resource I have available and cannot seem to find an answer to this anywhere, so here I am

The question is, how do I stop my AI from playing the die animation everytime he gets hit (for the purpose of my current setup everyone has a health of 1 which means one shot kills all around)

after the AI plays his Death animation if he is hit again he jumps back to the start of his death animation and dies again, how do I prevent this? I tried using a death function a few diff ways then I resorted to something a little more deliberate but neither seemed to work… PLEASE HALP!!

see attached images for string

Have you tried making a bool for “dead?” When he dies? Just make a branch with “dead? + NOT” as the input

Hmmm, i think i understand what you mean just not sure where it would go?

So create a variable called IsDead, get a reference to it, connect to a branch before the spawn emitter then set IsDead after the animation?

could you please explain how would you do it a little more, im pretty noobish?

When the ai health reaches 0 you should make a branch with your Boolean (dead) and drag false into your death code and set dead to true at the end of all of that. That way he can only die once. Another way to do it is to only apply damage if his health above 0. You will have to get a > node from your health float to see if health is greater than 0. If yes then set health to health - damage with a clamp at the end. Clamp it from 0 to a high number. The add a < to the resulting float value to see if health is below 0 after the damage is dealt. If yes then do your stuff. You can also just deactivate the skeletal mesh, that way you would only have to add one node. Just drag out the mesh and type deactivate

like this,? cause that’s not working sadly :frowning:

Il try your other suggestion

BRO… or however you most enjoy being addressed . Atornity FTW!!!

the first and last suggestions you made failed to yield a successful result BUT

“Another way to do it is to only apply damage if his health above 0. You will have to get a > node from your health float to see if health is greater than 0. If yes then set health to health - damage with a clamp at the end. Clamp it from 0 to a high number. The add a < to the resulting float value to see if health is below 0 after the damage is dealt. If yes then do your stuff.”

This… This worked a treat. Thankyou so much!!! LEGEND!