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

#1 2011-03-29 08:31:52

higejolly
Scratcher
Registered: 2009-08-08
Posts: 500+

Wall

How do you make a wall with this script?
<when green flag clicked>
<forever>
<if><key[ left or right arrow ]pressed?>
<change x by( number )
<end>
<if><key[ up or down arrow ]pressed?>
<change y by( number )
<end>
<end>

I put "left or right arrow" and "up or down arrow" because I am lazy. I didn't bother to put a number, either.

Last edited by higejolly (2011-03-29 08:33:18)


http://www.free-iqtest.net/images/badges2/l102.gif
Free-IQTest.net - IQ Test

Offline

 

#2 2011-03-29 13:36:27

GurkinC
Scratcher
Registered: 2009-11-30
Posts: 100+

Re: Wall

There are other ways, but the simplest is to make it turn 90 degrees when touching the colour of the wall. Would that work for you?


Try my latest game, Rolling 2, a 10-level platform game based around the gravity marble.

Offline

 

#3 2011-03-30 18:34:30

Shin23
Scratcher
Registered: 2011-01-30
Posts: 100+

Re: Wall

Here is a very nice tutorial on a very good way to do wall sensing.

http://scratch.mit.edu/projects/fireball123/940816


http://scratch.mit.edu/static/projects/Shin23/1957329_med.png New Super Mario Bros. Scratch! (beta)
PSN: shauthegreat23

Offline

 

Board footer