Discuss Scratch

comlarsic
Scratcher
4 posts

How to make a Undertale health bar

Hi i'm making a Undertale fan-game but i cant figure out how to make a health bar.
i tried doing this:

i created two sprites, one that hides the bar when its out of the health area and the bar itself.

these are the sprites for the bar:

whenclickedforeversetxtoxposition+health

but that doesn't work can anyone help?

im not a good or bad man, im a mad man

Last edited by comlarsic (May 24, 2017 07:17:59)

awesome-llama
Scratcher
1000+ posts

How to make a Undertale health bar

comlarsic wrote:

Hi i'm making a Undertale fan-game but i cant figure out how to make a health bar.
i tried doing this:

i created two sprites, one that hides the bar when its out of the health area and the bar itself.

these are the sprites for the bar:

whenclickedforeversetxtoxposition+health

but that doesn't work can anyone help?

The script says every loop, the sprite moves across it's x position PLUS the health. Every tick will move it across to the right. You may want to do something like:
setxto-50+health
where -50 is the x position of the sprite when there is 0 health in the variable.
comlarsic
Scratcher
4 posts

How to make a Undertale health bar

thx that seemed to work.

now i can continue with the project

whenclickedforeverimagineprogramshare
TheSillyClown
Scratcher
27 posts

How to make a Undertale health bar

it is simple,you ony need 1 sprite,create the hp bar and convert to bitmap,then use the brush and set brush size to 1-5,thencreate a hp barr with it,then keep creating costumes with more red on it untill you get a costume that has full red,then make a hp variable and put
whenclickedforeverifHP=99thenswitchcostumeto



and keep doing that and you got your a HP bar
TheSillyClown
Scratcher
27 posts

How to make a Undertale health bar

i meant
whenclickedforeverifHP=99>thenswitchcostumeto 100end
TheSillyClown
Scratcher
27 posts

How to make a Undertale health bar

as you can see i am new to this type of stuff,but just when flag clicked forever if HP is under 100 then swicth costume to 90's and yeah
codeman1044
Scratcher
1000+ posts

How to make a Undertale health bar

Please don't necropost. This topic is 2 years old.
TheSillyClown
Scratcher
27 posts

How to make a Undertale health bar

Oh,i found a way
whenclickedforeversetxtoHP+Xposition-themaxhp
TheSillyClown
Scratcher
27 posts

How to make a Undertale health bar

whenclickedforeverimageprogramshare
TheSillyClown
Scratcher
27 posts

How to make a Undertale health bar

defineScratchforeverimageprogramshare
deck26
Scratcher
1000+ posts

How to make a Undertale health bar

TheSillyClown wrote:

defineScratchforeverimageprogramshareend/quotePleasestopblockspammingandnecroposting.
-Reshiram-
Scratcher
100+ posts

How to make a Undertale health bar

deck26 wrote:

TheSillyClown wrote:

defineScratchforeverimageprogramshare
Please stop blockspamming and necroposting.
Fixed quotes

Last edited by -Reshiram- (Sept. 22, 2019 14:59:20)

hunochraties_
Scratcher
2 posts

How to make a Undertale health bar

whenclickedforeverdefineImagineprogramandshareend
SwanHelium
Scratcher
3 posts

How to make a Undertale health bar


.

Last edited by SwanHelium (March 29, 2020 21:17:41)

pvzsupersanicman
Scratcher
50 posts

How to make a Undertale health bar

i cant make colors happen but just get a sprite and make a message of and
whenclicked
iftouching white?thenbroadcast oofsorryifthisiswrongyoudontgettheblocksshownwhenyouwritefortheheatlhbarspritemakeafullhealthcostumeandthenkeepmakingdamagedheathbarsthenmakeaheathbarthatisdeadwhenIreceive oofnextcostumeplzknowthegameimusingthisonisaworkinprogresssoidontknowhowtodie
pvzsupersanicman
Scratcher
50 posts

How to make a Undertale health bar

i will reply when i know more

Last edited by pvzsupersanicman (June 16, 2020 12:54:41)

pvzsupersanicman
Scratcher
50 posts

How to make a Undertale health bar

here is a link to my work in progress game it is deltarune but the heath bar still works for a undertale game https://scratch.mit.edu/projects/405166944/editor/


whenclicked
foreverimageprogramshare

Last edited by pvzsupersanicman (June 16, 2020 13:00:04)

pvzsupersanicman
Scratcher
50 posts

How to make a Undertale health bar

ok im back and i know how

make a death backdrop
than do this for your heath sprite
whenIreceive deathhide

than use this
ifhp=0thenbroadcast death
sorry if this is wrong
do this for all sprites

whenIreceive deathhide

Last edited by pvzsupersanicman (June 16, 2020 13:52:23)

TheColaber
Scratcher
500+ posts

How to make a Undertale health bar

pvzsupersanicman wrote:

ok im back and i know how

make a death backdrop
than do this for your heath sprite
whenIreceive deathhide

than use this
ifhp=0thenbroadcast death
sorry if this is wrong
do this for all sprites

whenIreceive deathhide
Please do not post on very old topics… this one is from 2017!

Powered by DjangoBB