Use Trigger parameters to call Damaged animation on any state

Hi there!

I was wondering if there was an easy way to call a one time animation on any state.

What I want : Call Damaged animation (player is hurt) on any state, just by using a trigger.

My issue :

Without exit time, the animation get cancelled right away because another animation override it.

With Exit time, it clunky has If the player get hit multiple time, I want it to reset the damaged animation right away.

Bonus question :

Should I set the damaged animation on a different layer? So the others animation continues at the same time as the damaged animation.

Thank you!

The danger with this is that you need to implement this from an any state transition, and any time the trigger is true it will retrigger the same animation even if it already playing, so as a long term solution this become hard to maintain.

This seem like the right approach to me, rather than using a trigger you simply change the weight for your layer that play the hurt animation. If you setup this layer as an additive layer you can even have your base layer still playing the orignal animation by example a walk and add you hurt animation on top of it.

1 Like

Thank you good sir.

To be honest, I didn’t touch multi layer animation yet, so I’m pretty lost when you talk about weight and additive layer. But I will check it out tonight and test it.