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

#1 2008-02-29 15:01:22

Calimero_200
Scratcher
Registered: 2008-02-28
Posts: 74

Can Anybody Help Me With The Life Point Things On Scratch?

Hiya all,

I'm having difficulty doing a decreasable life meter on my games. Can anybody explain how you do it for the playable characters and non-playable ones?

It would really help,
Thanks in advance,
Calimero  big_smile

Offline

 

#2 2008-02-29 15:21:57

Lanie
Scratcher
Registered: 2008-02-03
Posts: 1000+

Re: Can Anybody Help Me With The Life Point Things On Scratch?

well you want a variable, name it Health, and when something happens like u get attacked, tell the variable to decrease by what ever number u choose. but the number must have a negative before it

<change{ Health }by( -10 or whatever number

Last edited by Lanie (2008-02-29 15:23:14)

Offline

 

#3 2008-02-29 15:33:01

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Can Anybody Help Me With The Life Point Things On Scratch?

For some examples of the graphical representation of health, look here:


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#4 2008-02-29 16:41:48

Calimero_200
Scratcher
Registered: 2008-02-28
Posts: 74

Re: Can Anybody Help Me With The Life Point Things On Scratch?

Thanks Lanie. I should of been able to do that actually  tongue

Offline

 

#5 2008-02-29 18:19:31

Lanie
Scratcher
Registered: 2008-02-03
Posts: 1000+

Re: Can Anybody Help Me With The Life Point Things On Scratch?

lol, ur welcome

Offline

 

#6 2008-02-29 18:57:45

Calimero_200
Scratcher
Registered: 2008-02-28
Posts: 74

Re: Can Anybody Help Me With The Life Point Things On Scratch?

XP Another problem! (You might have guessed i haven't done many Scratch games before!) I've done the instructions that lanie posted and it's working fine... except you have to get the level of score exactly on 0 to end the game! how can you vary it from 0 to -100?

This is my first Scratch game so i haven't used many of the variables before as i've only done animation sorta stuff.
Calimero

Offline

 

#7 2008-03-01 01:42:59

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Can Anybody Help Me With The Life Point Things On Scratch?

Instead of
"If health = 0"

use

"If health <1


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#8 2008-03-01 03:43:30

Calimero_200
Scratcher
Registered: 2008-02-28
Posts: 74

Re: Can Anybody Help Me With The Life Point Things On Scratch?

Lolz I should be able to work these out! You can see the frankly quite badly programmed demo on my profile.

Offline

 

Board footer