How to have animation BP trigger event on animation complete?

I have an IsAttacking state which transitions into the attack animation, which doesn’t repeat, but how do I notify my character BP that I’m done attacking so I can toggle off the IsAttacking state? I normally was doing this with a Montage, but that’s a bit of an old way of handling animations and is more manageable for me to deal with it all in my animation BP. Below is my animation graph.

Blend In Weapon

Weapon State
image

Ideally I’d just call an event on the animation BP, which would call an interface function on my character like the following, but can’t seam to figure out how to call the animation BP event when an animation completes.

I should also note this is an Animation Template so it can be reused between my characters. So some stuff might night be available due to that?

Suggestions welcomed! Thank you!

Hi Krileon,

One simple way would be to add a “Notify” at the end of your attack animation, and then set “IsAttacking” to false when that is triggered…

In a montage? I’ve tried using a montage, but for whatever reason it causes Unreal to crash with the following.

Assertion failed: false [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Classes\Animation\AnimMontage.h] [Line: 742] 

I can directly add a notify to the sequence, but I’ve no idea how to listen for that in the animation BP. I’m not doing this from the character BP where I’d just listen for an event during PlayMontage.

Yes, in the Animation Sequence itself - you can process it in your AnimationBP event section - it would be exactly like footstep code:

I’m using an animation template. Animation templates don’t know what sequences are being used in advance so it can’t know such an event will exist.

I however found a solution. I create a new BP that parents AnimNotify. In that I override Received_Notify and call GetOwner on the MeshComponent. Next I call my interface function DoneAttacking. This sets the IsAttacking state on the player back to false, which the anim bp picks up in its animation instance update tick.

1 Like