I have a traffic light(Shapes("light") and I have a car(shapes("car"). What I want to do is control car's movement according to the traffic light's color.
If the color is green, movement of a car is the same as before. But if the color is red, it must stop behind the traffic light or take another route.
So I have managed to make traffic light change colors, but I don't know how to read the value of color "green" and "red" from traffic light.
An example of what I want to do:
if shapes("light").color=green then
do
car_1.incrementleft speed + rnd()*10
paus 0.04
loop until car_1.left > line_5.left
end if
Bookmarks