<when green flag clicked>
<forever>
<if><touching[ Wall
<wait( 0.01 )secsc>
<end>
<end>
Offline
You could use something like this:
http://scratch.mit.edu/projects/juststickman/1014254
Only look at the first script in the players unless you enjoy long laggy math.
Offline
Greentabbys script wouldn't do anything at all.
You can either do it the complicated way or simply have color sensors on the sprite and move -5/5 steps when it is touching a wall.
Offline
if your walls are a separate sprite, then you can try my method
[blocks]<when green flag clicked>
<forever>
<if> <touching[ [/blocks] Wall
[blocks] <set{ x velocity }to( [/blocks] 0
[blocks] <end>
<end>[/blocks]
('if you use x velocity)
[blocks]<when green flag clicked>
<forever>
<if> <touching[ [/blocks] Wall
[blocks]
<repeat until><< <not> <touching[ [/blocks] Wall [blocks] >>
<change{ <x position> }by( 1
<end>
<end>
<end>[/blocks]
The second method has 1 problem. You have to make a way of this happening on both sides or When you go from the Right, its OK But when you go from the Left, it runs the wall over. Hope this helped
Offline