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…

#25041
krystman
Participant

    If I run this code I lose health in 10 unit increments until it reaches 20. If I get damaged while at 20 I skip going down to 10. Instead I go to 0 and die immediately. I believe the same happens in the fast-forwarded video above.