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…

#25043
krystman
Participant

    I think the problem is that we do this check AFTER we already subtracted damage from health. So we kinda we apply double the damage if it is enough to kill the player, right? Which is why that if-statement confuses me. If we leave this whole statement out, shouldn’t the HealthStatus() function figure out that the player has died anyway?