Reply To: Could you go into if (damage >= currentHealth) { is for? Won't this lead to the player dying prematurely – while…

Forum Archive Could you go into if (damage >= currentHealth) { is for? Won't this lead to the player dying prematurely – while… Reply To: Could you go into if (damage >= currentHealth) { is for? Won't this lead to the player dying prematurely – while…

#25040
Jonathan Gonzalez
Participant

    If the damage amount is greater than our current health then we automatically die. How are you getting 10 health?

    If the damage amount is say 11 and our current health is 10, then we are going to die because the damage amount is greater than the health. If you’re seeing something different let me know.