when I receive [loseLife1] -broadcast [takeheart1] -change [lives] by (-1) // variablePut the following on the heart sprite
when i receive [takeheart1] -hideDo this for each heart (take heart2, etc)
when gf clicked set (lives) to 3 forever if <(lives) = [3]> -Broadcast [gameover]
Last edited by Stickman704 (2012-02-24 13:46:03)
Offline
Mokat wrote:
Make the lives a sprite.
When I receive [lose v] //when they lose a life have them broadcast this. switch to costume [2 lives left v]
Actually, it's this:
I assume you have these costumes:
0n (0 lives left)
1n (1 life left)
2n
3n
when I receive [lose a life v] switch to costume ((costume #) - (1)) if <(costume #) = (1)> person loses // add a script here end
Last edited by rdococ (2012-02-24 14:56:22)
Offline
tayyib123 wrote:
Hi guys,
So basically im trying to make a game with 3 lives but i dont know how to amke the lives dissapear 1 by 1. if anyone knows please HELP! because i really need it.
Thanks!!! :
I have a project with lives, you an download it and see how I did it. You need one sprite with costumes, 1, 2, and 3 hearts, and one with nothing. then, you have it "stop all" when <([costume #] of [sprite]) = (4)> (the one with nothing is 4)
MOST EFFECTIVE WAY WITH NOT MANY SCRIPTS (edited version):
<if> <distance to[ sprite <=> 4
<stop all>
<end>
IMPORTANT: make sure the "distance to" is "costume #"
or
<if> <touching[ lava
<change{ <distance to[ sprite }by( 1
<end>
IMPORTANT: make sure the "distance to" is "costume #"
Sorry, new at forums, therefore looks weird.
Here's the project, because the stuff above probably made NO sense.
http://scratch.mit.edu/projects/Luxturna/2239467
Last edited by Luxturna (2012-02-25 18:53:59)
Offline
Make a sprite with three costumes, the first costume with one heart, the second costume with two hearts, and the third with three hearts.
When flag clicked switch to costume [ costume 3 v] show forever if <(Lives) < [3]> switch to costume [ costume 2 v] end if <(Lives) < [2]> switch to costume [ costume 1 v] end if <(Lives) < [1]> hide stop all end end
Last edited by CheeseMunchy (2012-02-25 19:44:08)
Offline
CheeseMunchy wrote:
Make a sprite with three costumes, the first costume with one heart, the second costume with two hearts, and the third with three hearts.
When flag clicked show forever switch to costume (lives) if <(Lives) < [1]> hide stop all end
I made it shorter.
Offline
Not if you talk l|k3 thi$ and not on this thread. If you need help, then make a new one.
Offline