Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make - HEALTH BAR
- deck26
-
1000+ posts
How to make - HEALTH BAR
You need to give more details. If the health bar only has values 0, 10, 20 up to 100 for example then a set of costumes might be enough.
- LoloThePro123
-
23 posts
How to make - HEALTH BAR
@TheLogFather made one here: https://scratch.mit.edu/projects/18482376/
- chuckler96
-
32 posts
How to make - HEALTH BAR
when green flag clicked
Say you want ten health, make ten costumes (in the health bar sprite) with one less (or more) hp point per costume
Then make a variable call playerlives or bosslives or whatever and make this:
when green flag clicked
set [ playerLives] to [10]
forever
switch costume to ((circleLives) + (1))
end
Then when you remove health by using
change [ playerLives] by (-1)It will go down
- Discussion Forums
- » Help with Scripts
-
» How to make - HEALTH BAR