I have a health bar, its has a near invisible scale on frame 1, on frame 100 its the biggest I want it to be. I want to be able to use the percentage of my max health left to determine the size of the bar.
is my script completely wrong?
cont = bge.logic.getCurrentController() own = cont.owner import bpy if own['health'] > own['healthMax']: own ['health] = own['healthMax'] if own['health'] < 0: own['health'] = 0 own['divide'] = (100 / own['healthMax']) own['percent'] = (own['divide'] * own['health'])
Heres pics of logic bricks and script
DynamicHealthHUD.blend (1.22 MB)