I want to make the two blocks move, but when the first block moved to the middle, it stoped. Then the second one start moving when the first block is in (0,0). Is it possible to let the second block and first block both move but the first one start first?
Here is the code:
from turtle import *
import time
import random
screen=Screen()
screen.setup(800,400)
x=0
blockx=500
blockx2=500
t1=Turtle(shape="square")
t1.speed(0)
speed(0)
t2 = Turtle ( shape="square" )
t2.speed ( 0 )
t2.up ( )
t2.goto ( blockx2 , -100 )
t2.down ( )
up ( )
goto (500, -110)
down ( )
goto(-500,-110)
while True:
t1.up()
t1.goto(blockx,-100)
t1.down()
blockx-=10
if blockx==-500:
t1.up ( )
blockx+=1000
t1.goto ( blockx , -100 )
t1.down ( )
if blockx==0:
t2.up ( )
t2.goto(blockx2,-100)
t2.down()
t2.shape("square")
blockx2-=10
if blockx2==-500:
t2.up ( )
blockx2+=1000
t2.goto ( blockx , -100 )
t2.down ( )