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

#1 2012-10-27 12:57:55

bainesdread
New Scratcher
Registered: 2012-10-26
Posts: 1

pac-man lives

i'm completely new to scratch and my teacher is a complete moron and doesnt know anything either so i really need help. i've been trying to figure out how to set up lives for a pac-man game that he wants us to make but i have no idea and obviously i cant ask him so if anyone knows how to set up lives and make them count down every time a ghost touches you i'd really apreciate it

Offline

 

#2 2012-10-27 13:27:55

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: pac-man lives

when gf clicked
repeat until <(lives) < (0)>
if <touching [ghost v]?>
change (lives) by (-1)
end
end

Last edited by meew0 (2012-10-27 13:28:16)


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#3 2012-10-27 13:49:39

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: pac-man lives

meew0 wrote:

when gf clicked
set [lives v] to (2)//Or however many lives you want minus one.
repeat until <(lives) < (0)>
if <touching [ghost v]?>
change [lives v] by (-1)
wait until <not <touching [ghost v]?>>
end
end

Fixed and edited.


http://i46.tinypic.com/35ismmc.png

Offline

 

#4 2012-10-28 12:10:31

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: pac-man lives

bainesdread wrote:

... and my teacher is a complete moron and doesnt know anything ...

Careful, your teacher (or anyone, for that matter) can access this forum.

Last edited by amcerbu (2012-10-28 12:10:45)

Offline

 

Board footer