I have a health bar with 56 animations and I want it to reflect the health of the player. Here's my code:
Draw Actor -->healthbar
animpos = abs(((health / maxhealth) * 55) - 55)
the absolute value is there because the health bar is going the opposite direction it needs to.
I tried writing (health / maxhealth) as a float variable and replacing it with the float variable "floaty" but it still didn't work
like this
Draw Actor -->healthbar
float floaty
floaty = health / maxhealth
can anybody help me? It seems like this code should work.