How to make attacker ignore defender's death animation

Hello everyone,
So I do pretty similar in my game, the attacker is attacking my defender, but what I want to do, is that after attacker kills my defender, he walks past it, and the defender is playing the death animation. but what happens, is that the attacker is still attacking defender, while its playing death animation, cause it still has target.
I tried a lot of things, but just can’t find a solution, how can I make so that attacker ignores the defenders death animation.
Any Ideas?

Hi Antanas,

You could try to disable the collider of the defender when the defender’s health is 0.

Hey Nina,
Thank You for Your suggestion,
unfortunately, I have tried it, but it doesn’t work, even though it disables the collider, attacker still has target and he attacks it

How can the attacker have a target if the collider of the defender is disabled? Check that with a Debug.Log in the Attacker class.

Maybe you are confused by the attacking animation which finishes playing before the animator goes to the next state. What value did you select for “Exit Time”?

Hi Antanas,

Could you possibly update us on this or mark if a solution has been found :slight_smile:
Thanks in advance

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms