def petMove():
pet.moveXY(50, 21)
# Use pet.on("spawn", petMove) instead of petMove().
# This way your hero and pet will run at the same time.
petMove() # ∆ Replace this with pet.on("spawn", petMove)
pet.on("spawn", petMove)
hero.moveXY(50, 12)
I tries some other ways, the result hero and pet also cannot reached finish line together.
Can someone give some hints and advises.
Thank