[ENGINE] Health is not being redrawn after player death

darkhog

New member
I have health displaying as a number and once player dies, it is not being redrawn. It's internally reset to proper value, just HUD isn't updated. Have tried to force it to be redrawn in handlebounds (where it handles player death), but to no avail. Help?
 

chronosv2

New member
It likely isn't that it isn't being redrawn, it's that the health HUD variable isn't being reset.
Perhaps in the code for death reset the value just before the game resets?
 

darkhog

New member
But when I hurt the player, the value gets drawn properly (initial health-1 because player was hurt)?...
 

chronosv2

New member
That's because the Hurt routine sends the proper value to the HUD.
Line 40:
Code:
notPlayerDeath:

	STA Object_health,x
	STA myHealth
The "STA myHealth" is sending the value being stored for the Object's health into the variable.

As said, when you restart after a death it's simply not assigning the starting value to the health bar variable. Doing that solves this problem.
 
Top Bottom