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

#1 2011-09-15 14:37:28

stapletonju
New Scratcher
Registered: 2011-09-15
Posts: 2

Help!

Need help. Making a pacman game, but I am unsure how to make the food move to different places after he eats it.

http://scratch.mit.edu/projects/stapletonju/2030425

Offline

 

#2 2011-09-15 15:54:52

PlutoIsHades
Scratcher
Registered: 2010-10-18
Posts: 1000+

Re: Help!

Let's say you have 5 different food pieces.  Give each this script:
[blocks]<forever>
<if><touching[ Pacman
<change{ score}by( 1
<go to x sad  <pick random( 180 )to(  -180)y: ( <pick random( 180 )to( -180[/blocks]
Set the pick random to whatever numbers you need.  This script works, though.
Hope this helps!

Last edited by PlutoIsHades (2011-09-15 15:55:18)


Minecraft, Redwall, and Cyberchase fan, and PROUD.

Offline

 

#3 2011-09-19 14:14:49

stapletonju
New Scratcher
Registered: 2011-09-15
Posts: 2

Re: Help!

Okay, that works for moving the food, but now pacman goes through the walls. How can I make him not ?

Offline

 

Board footer