I am creating a game where the player clicks on a turtle screen, the turtle then goes to that point and stamps an impression of itself. Anyone know how to use turtle.onscreenclick?
The first parameter of onscreenclick() is the name of a function.
onscreenclick() will call this function later, and pass to it the x,y coordinates of your mouse click. So make sure that the function you give it is defined with x,y parameters.
How to use turtle.onscreenclick?
I am creating a game where the player clicks on a turtle screen, the turtle then goes to that point and stamps an impression of itself. Anyone know how to use turtle.onscreenclick?
Here is an example repl:
https://repl.it/@mwilki7/turtle-testing
The first parameter of onscreenclick() is the name of a function.
onscreenclick() will call this function later, and pass to it the x,y coordinates of your mouse click. So make sure that the function you give it is defined with x,y parameters.
"Turtle" has no attribute "Screen"
try it or refresh page once more, i was copy pasting some stuff
try turtle.Screen()