Make a sprite for the health bar. Give it multiple costumes, with varying levels of health displayed. Then simply have a loop to detect health from a variable, and set the costume accordingly.
Last edited by awesome-llama (Feb. 8, 2018 06:06:05)
↑↑ Click any of the images for an awesome project! ↑↑
My 500th post: https://scratch.mit.edu/discuss/topic/189237/
My 1000th post: https://scratch.mit.edu/discuss/topic/216809/
My 1500th post: https://scratch.mit.edu/discuss/topic/234381/?page=1#post-2388018
YmFja3VwLXNpZ2d5LWlk Google this to see some of my posts.
How do I do Health bars? I'd like to know how to do it because I'm making a game that would be a ton better with health bars
Like awesome-llama said make multiple costumes and a
(health)variable then something like
foreverjust keep repeating those steps using if else… (of course depending on how many costumes you have it varies the number in the if else)
if < <(health)> then
switch costume to [above 80%]
if < < (health)> then
switch costume to [above 60%]
Hope that helped
Last edited by Gudo (Feb. 8, 2018 08:03:55)
define health bar (run without screen refresh)
go to x: (0) y: (0)
go to x: (health) y: (0)
Did I help? If so, consider following me!
Forums not helping out your scripts? Want me to answer your questions in particular? Put your projects you have a question of in this studio! I would try my best to answer you. I care more about understanding the problem than knowing how to fix the problem.