Lives counter help fixed


#1

Hello. I’m trying to create a life/hp counter system. As of now, the issue is the healthpercent will decrease to 0 when taking damage from enemy. After the health percent reaches 0 it will jump up to 80 and the lives counter will subtract 1. The lives counter stays at 2 while the healthpercent resets itself to 80 when it reaches 0.

What I’m trying to do is when the health percent reaches 0, subtract 1 life and reset the healthpercent to 100 and begin that process again until lives=0 then game over. Need help please.


#2

Of course!!! As soon as I post help needed, I seem to have fixed the issue I was having. Instead of VarDo = 100 to scene variable healthpercent, I changed the value to 120. I don’t understand why my hp was resetting to 80 and not 100, originally. Something to do with VarDo -20 to scene variable healthpercent, under playerdamage.