Health bar calculation
Posted: Sun Aug 21, 2011 10:48 pm
Hi, guys. I saw something about it in the forum, but I cant' find.
I have enemies with different life values (life=100; life=400; life=600) and my healthbar animation has 10 positions. But, to become more realistic, I would like to avoid this simple code:
hp-=10;
enemy.animpos=hp;
What could be a right calculation? Thanks.
I have enemies with different life values (life=100; life=400; life=600) and my healthbar animation has 10 positions. But, to become more realistic, I would like to avoid this simple code:
hp-=10;
enemy.animpos=hp;
What could be a right calculation? Thanks.