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

#1 2012-12-18 17:24:22

obnox
New Scratcher
Registered: 2012-12-13
Posts: 8

need help!

I just made a game and I really want there to be a countdown for lives so that the game will end after you die three times or something. I just can't figure out how to do it!
Please Help Me!!!!!!
The game is on my account if you think that you can help.

Thank You!
The Obnox

Offline

 

#2 2012-12-18 17:36:55

AriArk
Scratcher
Registered: 2008-01-06
Posts: 25

Re: need help!

Make a variable called lives, and on a when green flag pressed script, put a Set Lives To 3 block. On the script where you die, make a Change Lives By -1. Finaly , on the script where you die put and If lives = 1 and inside that put Stop All Scripts. Thats a basic one.

when gf clicked
set [lives] to [3]
end

when I receive [died]
if < [lives] = [1]>
Stop All
end
Change [lives] by [-1]
if lives = 1 is a variable

Last edited by AriArk (2012-12-18 17:40:41)

Offline

 

#3 2012-12-18 18:15:34

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: need help!

AriArk wrote:

Make a variable called lives, and on a when green flag pressed script, put a Set Lives To 3 block. On the script where you die, make a Change Lives By -1. Finaly , on the script where you die put and If lives = 1 and inside that put Stop All Scripts. Thats a basic one.

when gf clicked
set [lives v] to [3]
end

when I receive [died]
if < (lives) = [1]>
Stop All
end
Change [lives v] by [-1]
if lives = 1 is a variable

AriArk, to make a variable just put it in () instead of [].

Last edited by BoltBait (2012-12-18 18:16:18)


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

Board footer