Looking for a tip: How to interrupt an animation to play another one in Locomotion?

Hi Guys,

Been working on a game for a while now, the amount of times I get stuck I can’t even count. lol.

My issue is, when my character is punching another, the other one reacts based on where he was hit, which is fine. But my question is, if I double punch, lets say, once in the face and then to the leg, I want the head hit reaction to stop and begin the leg hit reaction, and then of course return the character to the idle pose.

That is how I am trying to transition between the hit reactions, does this look like the proper way? Having it like this isn’t working out, the first animation still plays to finish before allowing the 2nd hit to play, I also end up getting delayed 2nd hits because the player is retracting his arm already, however its still overlapping the enemy players mesh.

Bump…

Did you ever get an answer to this anywhere? I’m having a similar problem now…

I would use animation slots for this. That way you can play the hit reaction animation from the character BP using the Play Slot Animation node. Then if the slot receives another animation while playing the first one, it will change to the new one.

Thank you, I will give this a shot! Could you point me to any examples that might have something like this setup by any chance? I’m struggling to find good hit reaction setup information.

Do you need to play the hit animation on one part of the body while the other part is doing something else? Like for example running while upper body is playing the hit reaction animation?

You’ll need to add a new animation slot from your AnimationBP.

250842-screen-shot-2018-08-18-at-133406.png

I named the slot “HitReact”

250843-screen-shot-2018-08-18-at-133440.png

Add a slot node into your animation graph

250844-screen-shot-2018-08-18-at-133615.png

Set the slot to HitReact slot from the node details

Create this node setup in your character/pawn blueprint to play the animation on the Hit event

Thank you!

I wouldn’t need to place a different animation during the hit, only to interrupt a hit for a new one. Working on a fighting game.

I super appreciate the help!