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

#1 2008-04-28 01:37:53

datsuper7
Scratcher
Registered: 2008-04-15
Posts: 13

Solid sprites

I'm trying to make a maze game and I can't figure out how to stop the character from going through the wall.
Please help!

Thank You!

Offline

 

#2 2008-04-28 13:30:16

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Solid sprites

It depends on the script you are using to move your sprite.  You need something in that script that stops it from working if it can sense their is whatever you are using as a wall in front of it.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#3 2008-04-28 14:37:21

Jacobo
Scratcher
Registered: 2007-06-15
Posts: 100+

Re: Solid sprites

Use something like this for each key:
<when[ Right Arrow ]key pressed>
<if><<  <not><touching color[ Color of walls >>
<change x by( -3


"It's like deja vu all over again"
-Yogi Berra

Offline

 

Board footer