Health Bars, changing max hp
raze_struck
Member, PRO Posts: 141
Hello all,
I've seen the video tutorials on designing health bars (thanks t-shirt booth), however the life attribute in the videos do not change. For example, i have current hp and max hp, and when my character levels up, his max hp will change.
So i want to display my current hp in the form of a health bar, and want it to shrink as a percentage when my actor takes damage. I can't constrain the width to game.life*20, because game.life will change eventually and the bar will just keep increasing in size.
I want the health bar to remain the same size throughout the game, but account for the changes in max hp.
suggestions?
Comments
You have two bars then. One that is fixed width and represents the entire range of hp (from 0 to some maximum), and one that is constrained to the percentage of the maximum (an attribute) that the current hp represents times the width of the fixed bar.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Sorry, im kind of lost
Here's a demo: http://forums.gamesalad.com/discussion/comment/469042/#Comment_469042.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thank you, so I implemented everything, but one thing, when my HP bar hits half health its fully depleted?
nvm got it, thank you