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

#1 2009-09-19 15:05:25

mudkip98
Scratcher
Registered: 2009-08-31
Posts: 6

walls

how do i make walls that my sprite cant go through that will not change its direction when it topuches it


<when green flag clicked>
<switch to costume[ mudkip98
<turn cw( 10 )degrees>
<move( 10 )steps>

Offline

 

#2 2009-09-19 15:43:45

06dknibbs
Scratcher
Registered: 2008-01-29
Posts: 1000+

Re: walls

Well a basic way is to do this  smile

First choose a colour for your wall, eg: blue.
Then draw all your walls in blue.

Then with the movement scripts use,

Green flag,
Forever,
If key "Right arrow" pressed,
Change X by "10"
If touching colour "Colour of wall"
Change X by "-10"

Do this for the other 3 directions but keep in mind up and down needs Y instead of X  smile


http://i404.photobucket.com/albums/pp129/06dknibbs/Untitled-3-6.jpg

Offline

 

#3 2009-10-10 22:44:08

mudkip98
Scratcher
Registered: 2009-08-31
Posts: 6

Re: walls

thankk you

<when green flag clicked>
<switch to costume[ mudkip98 ]
<turn cw( 10 )degrees>
<move( 10 )steps>

Offline

 

Board footer