How to Add an Attack/Flinch Animation to a state machine? (Best Practise)

Heya, I’m creating an animation blueprint which blends between full body animations, which makes this a fairly simple asset. However, I am implementing a one shot Attack and Flinch animation and I want to find the best practise for doing this, that is stable, optimised, and responsive.

Sure, I could flick on a Boolean “Is Attacking” / “Is Flinching” and let the state machine handle the transition, but this is clearly a very poor way to do this, as it is dependant on the state machine tick to pick up on the bool before I turn it off again. I’d rather have a solution where i can fire this specific animation, once, and it can blend in and out of my existing state machine.

So just to be clear, I’m not looking for hacky ways to make this work. I am on a hunt for a best practise method that I can use to treat these animations.

Thank you in advance!

I’ve currently settled for using a “Play Slot Animation as Dynamic Montage” node. My Actor can easily get a reference to its own Animation Instance and call this node whenever I need to.

You Bridge a Slot node between the State Machine and the Final output pose and just reference that node. You can then feed it one shot animations via this node. It works great for Flinches and Attacks.

It’s much better than the Bool driven method using the state machine, but due to lack of better knowledge, I can’t say whether or not this is the best method for what I am trying to achieve, so I will leave the Post open in case anyone has a better suggestion.