How can I move a two-colored square along a complex path in Scratch?

0
9
Asked By CreativeCarpenter42 On

I'm working on a Scratch project where I need to move a square that is half blue and half red along a specific path without touching the yellow edges. The goal is to reach a green spot at the end of the route I've been given in the book. However, I'm struggling to make it work properly. Any tips would be greatly appreciated!

2 Answers

Answered By SavvyCoder88 On

Check out the code and path I used here. It might give you an idea of how to implement it! [Image of code and path](https://ibb.co/hF08cZG0) [Image of path](https://ibb.co/Kx4cNyqb)

Answered By HelpfulHiker34 On

Think of it like driving a car: if your red side gets close to the edge, you need to turn left (counter-clockwise). If your blue side is about to hit the edge, turn right (clockwise). This might solve the issue of getting stuck on the yellow edges. Also, consider making the path a bit wider just to be safe.

CreativeCarpenter42 -

I've tried widening the path already, but it still gets stuck in the yellow. What should I do next?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.