Skip to content
← Back to Community
Help
Profile icon
AmiteshJinka

Hi, can someone tell me how to reset a turtle (in python) to its original state? I don't mean turtle.reset(), I mean making it go back to the position I set it to, and have its settings (like penup and shape etc.) what I set it to. For example, if two turtles hit each other, I want them both to go their starting positions and do the same function again.
This will really help me a lot.

Answered by Aivoybia [earned 5 cycles]
View Answer
Voters
Profile icon
AmiteshJinka
Comments
hotnewtop
Profile icon
Aivoybia
import turtle t = turtle.Turtle() y = turtle.Turtle() t.goto(1, 100) (for example) y.goto(100, 100) (for example) if [collision stuff]: t.goto(1, 100) #(the same x y as earlier) y.goto(100, 100) #(same as earlier as well)
Profile icon
AmiteshJinka

@Aivoybia Thanks! (Can't believe I didn't think of that lmao)

Profile icon
Aivoybia

@AmiteshJinka np.

would you mind marking my answer as correct?
just click the grey checkmark under the upvote sign, to the left of my comment

Profile icon
AmiteshJinka

@Aivoybia Yea, okay. Your welcome.

Profile icon
Aivoybia

@Aivoybia oh... that works too i guess

Profile icon
AmiteshJinka
Profile icon
Aivoybia