Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I make a health bar?
- TheEpicCoderPerson
-
1 post
How do I make a health bar?
I have been looking EVERYWHERE
And i still can't find out how..
Can someone help?
And i still can't find out how..
Can someone help?
- Cutie_Pooge
-
500+ posts
How do I make a health bar?
I made a tutorial two years ago, maybe useful. Here.
- Byron_Inc
-
1000+ posts
How do I make a health bar?
Use the pen extension. So you have the “health” variable from 1 to 100, and you do this, assuming the health bar is from (0, 160) to (200, 160):
I hope I helped you.
set pen color to [#00ff00]Of course, you can play with the numbers.
go to x: (0) y: (160)
pen down
go to x: (200) y: (160)
pen up
go to x: (0) y: (160)
set pen color to [#ffffff]
pen down
go to x: ((health) * (2)) y: (160)
I hope I helped you.

Last edited by Byron_Inc (July 26, 2020 11:41:05)
- RL1123
-
1000+ posts
How do I make a health bar?
You can use this project with credit:
https://scratch.mit.edu/projects/396122118/editor
https://scratch.mit.edu/projects/396122118/editor
- cooldude-222
-
100+ posts
How do I make a health bar?
when green flag clicked
set [health v] to (5)
forever
clear
go to x: (175) Y: (125)
pen down
change x by ((10) *(health))
pen up
if <touching [enemy v] ?> then
change [health v] by (-1)
end
end
- jimvy
-
1 post
How do I make a health bar?
How do i make a heath bar that after a number of seconds it takes health from you
- Discussion Forums
- » Help with Scripts
-
» How do I make a health bar?