Discuss Scratch

rob247666
New to Scratch
17 posts

maze



the robot is suppose to stop when it hits a wall, but its not?
ErnieParke
Scratcher
1000+ posts

maze

The picture that you've added doesn't show much of your scripts, and what it did show doesn't seem to be the problem part of it. So, could you maybe show the rest of your scripts?

With regards,

ErnieParke

kingofdallamas
Scratcher
45 posts

maze

If black is your wall and
If you're just using color sensors, then…


example:
if key right arrow pressed
move x=10
if key right arrow pressed and touching color __
move x=-10

or


example: (if this script also contains moving scripts)
if touching wall
repeat 10
change ghost effect 10
broadcast win



I put the ghost effect just for fun, but I don't know if this fits what you want. I hope this helps though!
And, of course, I probably don't have the most efficient scripts… Good luck!

-Kingofdllamas

Some day tonight.

Powered by DjangoBB