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.
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 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.
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.