I am new to scratch and I started making a pacman game. I want to make it so when my pacman hits the walls, the game ends and I don't know how to do it. I also want to make it so my octopuses hit pacman he will say game over and I don't know how to do that. Also, is there a way that I can make my pacman hit my bananas and fruit basket and they will disappear and reappear in a new spot? If someone can help me out that would be great! Thanks in advance.
Offline
For the walls, you can use a
<when green flag clicked><forever if><touching color[ colour of walls] <stop all>
For the fruit, you can use this script on the fruit:
<when green flag clicked><forever if><touching[ pacman] <hide><set x to( <pick random( -250 )to( 250) <set y to( <pick random(-250 )to( 250)<show>
Also, for the octopus:
<when green flag clicked><forever if><touching[ (pacman) <say[ game over ]for( 2 )secs>
I understand that might seem a bit complicated, but just ask and I`ll try to explain it.
Last edited by GurkinC (2011-10-31 17:12:36)
Offline
GurkinC wrote:
For the walls, you can use a
<when green flag clicked>
<forever if><touching color[ colour of walls] <stop all>
For the fruit, you can use this script on the fruit:
<when green flag clicked>
<forever if><touching[ pacman]
<hide><set x to( <pick random( -250 )to( 250)
<set y to( <pick random(-250 )to( 250)<show>
Also, for the octopus:
<when green flag clicked>
<forever if><touching[ (pacman)
<say[ game over ]for( 2 )secs>
I understand that might seem a bit complicated, but just ask and I`ll try to explain it.
I just cleared up the script a bit.
Last edited by Pecola1 (2011-10-31 17:21:48)
Offline