I can't figure out a good way to do top down wall sensing. This is how I don it now:
[blocks]
<when green flag clicked>
<forever>
<if><key[ up arrow ]pressed?>
<if><touching color[ color of wall
<change y by(-3)
<else>
<change y by(3)
<end>
[/blocks]
It seems like it would work, but there's a problem. Sometimes you'll keep crashing up against the wall, and then when you stop, you're touching the wall. So, if you press like the down arrow, you'll move up through the wall! Can someone help me with a better way of doing things? Thanks!
Offline
u can use this if u want: http://scratch.mit.edu/projects/TheBajeebas/1177833

Offline
Try this:

Last edited by Kileymeister (2011-06-27 21:45:09)
Offline
Or, in way this is like what Kiley said:
when clicked
forever
if up arrow pressed:
change y by 3
if touching wall or wall color
change y by -3
if down arrow pressed:
change y by -3
if touching wall or wall color
change y by 3
Offline
Wall sensing is hard.
Offline