Pencil Code Reference > wear

 

wear change the look of a turtle

wear changes the look of a turtle.

wear can change the color of a turtle's shell or replace its shell with an image.

Change Turtle Color

You can create a turtle with a default color and then change the color using the "wear" function.

t = new Turtle pink
s = new Turtle purple
t.fd 30
t.pause 2
t.wear blue

Change Turtle Image

You can replace the turtle's shell with an image. Notice that the URL for the image must be in quotes.

t = new Turtle pink
s = new Turtle purple
t.fd 30
t.pause 2
t.wear "http://gym.pencilcode.net/images/dog.png"