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

#1 2010-10-11 13:13:36

heXX
New Scratcher
Registered: 2010-10-08
Posts: 3

maze

how do you stop from running through walls.

Offline

 

#2 2010-10-11 16:53:05

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: maze

It's really simple, actually. I made a project demonstrating how to do it (http://scratch.mit.edu/projects/coolfixit/1347450) but I'll explain it here, too: you can't really tell how it works.

Basically, put four sprites around the main sprite. If, say, the right sprite is touching a wall, change a variable so that the main sprite knows it shouldn't move in that direction. The same goes for the other four directions. Go check out that project I created now to see exactly how things work  smile

Offline

 

Board footer