#"Player_Hurt" animation not working
12 messages · Page 1 of 1 (latest)
As far as I see there is no transition in animator to go Player_Hurt animation? @bright basalt
But as you can see, if I remove that part of code, the animation plays again, even if the character is invincible @stable dome
@stable dome Sorry, wrong video
Only thing comes to my mind is after collision you call the take damage. Take damage calls flashing and invulnerable methods so you are making the player instantly invulnerable
private IEnumerator BecomeInvulnerable()
{
isInvulnerable = true;
}
so can I ask u to make a log inside of the
if (!playerHealth.IsInvulnerable())
{
// Handle fireball collision with player
animator.Play("Player_Hurt"); // Plays the "Player_Hurt" animation
***Debug.Log("Hereee?");
}
Wait... to make the script work well, does the position it is in also matter (sorry but I'm not good at programming)? Because I just accidentally moved the PlayerCollision script on top of the PlayerHealth script and now it seems to work
Ohh, I didn't know that either
😅
Anyway, thank you very much for your patience and I'm sorry if I bothered you
No, I'm new too. I'm happy you solved it ^^
😊
the position of those scripts shouldn't matter