ID:164068   Jul 19 2007, 11:20 am I will need to put a HP bar in my game, but the highest (nax)HP value will be changing. so I was wondering if someone could give me a code on how to make it so the HP bar increases/decreases using percents. like if you are punched and it will realize that your hp is less than 80% and change according to that. thanks.
 Jul 19 2007, 12:34 pm current health / max health = the percentage between 0 and 1 (using decimals). If you want it to be a value from 0 to 100, just times that value by 100. Then simply make your health bar's icon_state be set to the resulting percentage.
 Jul 19 2007, 2:50 pm make if statements for example: if (HP = 0) flick "0HP" if (HP = 1) flick "1HP" if (HP = 2) flick "2HP" do that all the way to one hundred although if i were you i would do it by increments of ten instead of doing every single one.
 Jul 19 2007, 3:26 pm In response to Coco123 Bad idea, what if it is more than 100? Elation's post is more worthy of an idea than this
 Jul 20 2007, 5:53 am In response to Elation Can you show that to me in a code?