hdarren
Member
Hi. I am trying to make a health bar sprite using draw_sprite_part so that the less health the player has the less of the health sprite is shown.
The sprite goes from bottom to top and the max health is changeable. So at 100% I need a value of 0 and at 0 health I need a value of the full sprite height based on global.var_MaxHealth.
I am struggling with the equation to work this out though so I am hoping I can get help with that formula. Thank you.
The sprite goes from bottom to top and the max health is changeable. So at 100% I need a value of 0 and at 0 health I need a value of the full sprite height based on global.var_MaxHealth.
I am struggling with the equation to work this out though so I am hoping I can get help with that formula. Thank you.