Discuss Scratch

dptst
Scratcher
4 posts

Robot

Why isn't this working properly? The robot isn't going next to the black tiles.
I need help.
Here is the link:

https://scratch.mit.edu/projects/200282068/#editor

Press right and put the mouse next to the black tiles. The robot won't bother going towards the pointer.
Scratch-Minion
Scratcher
1000+ posts

Robot

Hi.

In block “My A* Algorithm” you test if the colour Red is touching Black when you test moving in 4 directions.
But the Red arrow extends beyond the new position of the Gray robot and touches the Black border.

Changing “if the colour Red is touching Black” to “if the colour Gray is touching Black” will help but there will be more to do.

I hope that helps.
dptst
Scratcher
4 posts

Robot

It is still not working. When I switch it to gray, it still wont turn to face the mouse.
dptst
Scratcher
4 posts

Robot

Wait, I just fixed the problem. The red arrow that was sticking out of the robot was for some reason touching the black. So I took away the red arrow and put a red dot on the robot. Thanks for trying to help!

Powered by DjangoBB

Standard | Mobile