How to apply damage to AI and animate it?

My character has a weapon (axe) when right click is pressed he swings the weapon. I also have several AI’s who wonder around I want to make it so when my character swings his weapon with right click and is in range the AI plays the death animation which I have then gets destroyed. This is a bit complex but if anyone could tell me how to do it I will be very thankful,

Thanks .

Normaly you have a box collision around your weapon which is not active at start. In your Swing animation, you create 2 AnimNotifies. One for turning the box collision on and one for turning it off again.

Then you would create an BeginOverlap event which passes the Actor, casts it to the AI Class and use “Take Damage” on it. Thats an Actor Function, so you can call it on every actor.

On the AI you have the “Event Any Damage” which gets called if you call “Tage Damage”. It has the game etc that you passed through Take Damage.

With this you can deal dmg or directly tell the AI to play an animation and destroy itself after.

Could you explain the part about AnimNotifiers in more detail please because i’m not really sure how to do it,

Tanks.

Hey, sorry i don’t have much time today. But if you use google a bit, you can find tons of tutorials and docs about it (maybe also youtube)

https://docs.unrealengine.com/latest/INT/Engine/Animation/Sequences/Notifies/index.html

It’s fine thanks for the advice.