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

#1 2008-09-21 17:29:50

skryed
Scratcher
Registered: 2008-04-26
Posts: 57

I Need Help!

Ok Thanks For Looking. In My Pacman Game, I Want The Ghoast To Turn A Random Direction, So Yeah. Help Me If You Know How Please


http://i10.photobucket.com/albums/a124/boysofsheahem/alphabet/I-1.pnghttp://i10.photobucket.com/albums/a124/boysofsheahem/alphabet/L-1.pnghttp://i10.photobucket.com/albums/a124/boysofsheahem/alphabet/Q-1.png

Offline

 

#2 2008-09-21 17:47:54

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: I Need Help!

I know how, but it could take a long time to describe...


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#3 2008-09-21 17:56:38

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I Need Help!

set randDir to random from 1 to 4
if randDir=1
go left
if randDir=2
go right
if randDir=3
go up
if randDir=4
go down

Something like that.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#4 2008-09-21 17:57:33

skryed
Scratcher
Registered: 2008-04-26
Posts: 57

Re: I Need Help!

archmage wrote:

set randDir to random from 1 to 4
if randDir=1
go left
if randDir=2
go right
if randDir=3
go up
if randDir=4
go down

Something like that.

thank you so much arch mage!


http://i10.photobucket.com/albums/a124/boysofsheahem/alphabet/I-1.pnghttp://i10.photobucket.com/albums/a124/boysofsheahem/alphabet/L-1.pnghttp://i10.photobucket.com/albums/a124/boysofsheahem/alphabet/Q-1.png

Offline

 

Board footer