0

I've Tried shapesize and turtlesize neither work, is there an alternative?

everything else works I just need a rectangle shape

    class Sword(turtle.Turtle):

        def __init__(self,plyr,color):
            turtle.Turtle.__init__(self)
            self.player = plyr
            self.speed(0)
            self.up()
            self.fd(25)
            self.goto(self.player.xcor(),self.player.ycor())
            self.shape("square")
            self.color(color)

        def collision(self):
            global zombies
            for x in range(len(zombies)-1,-1,-1):
                if self.distance(zombies[x]) <= 20:
            zombies[x].ht()
            del zombies[x]
            return True;
    s = Sword(p1,"blue")
vb_rises
  • 1,847
  • 1
  • 9
  • 14

2 Answers2

2
import turtle
t = turtle.Turtle()
t.shape('square')
t.shapesize(2.0, 1.0, 1) # width, len, outline

The full documentation for the turtle module is readily available.

1

If you want to change the size of the turtle/shape you should try using the shapesize() function. Hope this helps!