Discuss Scratch

TheEpicCoderPerson
New Scratcher
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?
Harakou
Scratcher
1000+ posts

How do I make a health bar?

Moved to Help With Scripts.
Cutie_Pooge
Scratcher
500+ posts

How do I make a health bar?

I made a tutorial two years ago, maybe useful. Here.
Byron_Inc
Scratcher
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):
set pen color to [#00ff00]
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)
Of course, you can play with the numbers.
I hope I helped you.

Last edited by Byron_Inc (July 26, 2020 11:41:05)

RL1123
Scratcher
1000+ posts

How do I make a health bar?

You can use this project with credit:
https://scratch.mit.edu/projects/396122118/editor
cooldude-222
Scratcher
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
Scratcher
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

Powered by DjangoBB