Hi guys,
I'm working on a simple HUD that shows the players HP in a little globe, like in the Diablo games.
Here's a rough mock up to show what i mean.
[IMG]http://2.bp.blogspot.com/-9Ku8xKWivSU/UuVBBPxI_JI/AAAAAAAACok/2Lf-D9HoZos/s1600/HUD.png[/IMG]
So basically the blue circle will go down as the players health goes down only in 4 stages though nothing fancy. 100% full, 75% goes down, 50% goes down, 25% goes down, 0% empty.
Now Ive got this working but only by using a constant in the conditional branch as i know the players HP starts at 100.
[IMG]http://3.bp.blogspot.com/-15xnE0P8Ha8/UuVBBNapjKI/AAAAAAAACog/Z2BIRM7_Qto/s1600/HP+HUD.png[/IMG]
The problem with this though is that as the player levels up his HP will change so this method will not work...is it possible to check the players HP as a percentage? so no matter how much HP the characters health goes up by i can always check 100%, 75%, 50%, 25% and 0% HP of the character to make this HUD work.
Thanks for any help! 🙂
I'm working on a simple HUD that shows the players HP in a little globe, like in the Diablo games.
Here's a rough mock up to show what i mean.
[IMG]http://2.bp.blogspot.com/-9Ku8xKWivSU/UuVBBPxI_JI/AAAAAAAACok/2Lf-D9HoZos/s1600/HUD.png[/IMG]
So basically the blue circle will go down as the players health goes down only in 4 stages though nothing fancy. 100% full, 75% goes down, 50% goes down, 25% goes down, 0% empty.
Now Ive got this working but only by using a constant in the conditional branch as i know the players HP starts at 100.
[IMG]http://3.bp.blogspot.com/-15xnE0P8Ha8/UuVBBNapjKI/AAAAAAAACog/Z2BIRM7_Qto/s1600/HP+HUD.png[/IMG]
The problem with this though is that as the player levels up his HP will change so this method will not work...is it possible to check the players HP as a percentage? so no matter how much HP the characters health goes up by i can always check 100%, 75%, 50%, 25% and 0% HP of the character to make this HUD work.
Thanks for any help! 🙂