This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-11-07 16:25:44

Coolzie1
Scratcher
Registered: 2009-11-06
Posts: 1

Veriables

I have made a game and I have made a veriable called health. I have also made a sprite that should act as the health bar can some one please tell me how I can get this to work because I have tryed everything and I can't seem to find the right script.

Offline

 

#2 2009-11-07 23:54:18

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Veriables

Can you post the link to the project? I will make a health bar for you if you want and you can copy the scripts!  smile  AND you don't have to give me credit.  wink


Hai.

Offline

 

#3 2009-11-08 00:55:00

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Veriables

My guess (because I haven't seen the project):

Whenever the sprite gets hurt, broadcast something (let's call it "Decrease Health").
When the sprite receives the broadcast, it changes costume to show the decreased health.

Note that your health bar sprite needs to have several costumes, one for every amount you can get hurt by.

Hope that helps!  smile


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

Board footer