Python, Pygame, Class object no longer callable
<p>I am writing a game using Pygame, now I am having this issue where I wanted to add a spawn timer on my monsters in the game. Now the timer works fine and the first spawn wave gets made and everything is great and terrific until the second wave where it says:</p>

<pre><code>Monster1 = Monster()
</code></pre>

<blockquote>
  <p>TypeError: 'Monster' object is not callable</p>
</blockquote>

<p>Now this I don't get, since it already called it in the round before then.  </p>

<p>I went over my text plenty of times just to see if I am changing any features in the the class or making it so that it shouldn't be callable anymore but I just don't get it.</p>

<p>This loop makes spawns the monsters</p>

<pre><code>while Game:
    if time.clock() - WaveTimer &gt; 10:
    WaveTimer = time.clock()
        print "The Moon is full"
        for i in range(3*SpawnRate):
            Monster1 = Monster()
            monster_list.add(Monster1)
            character_list.add(Monster1)
            SpawnRate += 1
</code></pre>

<p>This is the Monster class</p>

<pre><code>class Monster(Character):
    Current_HP = 50
    Max_Hp = 50
    walking_frame = []
    fighting_frame = []
    hit_frame = []
    Fighting = False
    Flag = True
    frame1= 0
    LastFrame1 = 0
    TimeBetweenAtkFrames = 0.1
    X_Speed = 0
    Y_Speed = 0
    damaged = False
    RecordedAni = True
    damagedspeed = 1
    image_file = "C:/Users/Gideon/PycharmProjects/untitled1/Sprite Images/All.png"
    sprite_sheet = SpriteSheet(image_file)
    hitimage = sprite_sheet.get_image(96, 336, 48, 48)
    hitimage = pygame.transform.scale(hitimage, (50, 50))
    for i in range(5):
        image = sprite_sheet.get_image(i * 48, 288, 48, 48)
        fighting_frame.append(image)
    for i in range(4):
        image = sprite_sheet.get_image(i * 48, 144, 48, 48)  # Temp
        walking_frame.append(image)
    for i in range(4):
        image = sprite_sheet.get_image(i * 48, 192, 48, 48)  # Temp
        walking_frame.append(image)
    image = sprite_sheet.get_image(0, 144, 48, 48)
    image = pygame.transform.scale(image, (50, 50))
    orgimage = image
    def __init__(self):
        pygame.sprite.Sprite.__init__(self)
        self.Loc_x = random.randrange(20,700)
        self.Loc_y = random.randrange(20,100)  # temp
        self.rect = self.image.get_rect()
        self.rect.left, self.rect.top = [self.Loc_x, self.Loc_y]
        for i in range (2):
            image = self.sprite_sheet.get_image(i * 48, 336, 48, 48)
            self.hit_frame.append(image)
            i += 1
    def move(self,character):
        if self.Alive:
            if self.Current_HP &lt; self.Max_Hp:
                self.damagedspeed = 2
            if character.Loc_x &gt; self.Loc_x + 25:
                self.X_Speed = 1.5 * self.damagedspeed
                self.Loc_x += self.X_Speed
            if character.Loc_x &lt; self.Loc_x - 25:
                self.X_Speed = 1.5 * self.damagedspeed
                self.Loc_x -= self.X_Speed
            if character.Loc_y &gt; self.Loc_y + 25:
                self.Y_Speed = 1.5 * self.damagedspeed
                self.Loc_y += self.Y_Speed
            if character.Loc_y &lt; self.Loc_y - 25:
                self.Y_Speed = 1.5 * self.damagedspeed
                self.Loc_y -= self.Y_Speed
            if (self.Flag):
                self.Animation()
            wall_hit_list = pygame.sprite.spritecollide(self, CollideList, False)
            for wall in wall_hit_list:
                if self.X_Speed &gt; 0:
                    self.X_Speed = 0
                    self.Loc_x = self.Loc_x - 5
                if self.X_Speed &lt; 0:
                    self.X_Speed = 0
                    self.Loc_x = self.Loc_x + 5
                if self.Y_Speed &gt; 0:
                    self.Y_Speed = 0
                    self.Loc_y = self.Loc_y - 5
                if self.Y_Speed &lt; 0:
                    self.Y_Speed = 0
                    self.Loc_y = self.Loc_y + 5
            self.FightAnimation(character)
            self.image = pygame.transform.rotate(self.orgimage, self.Angle)
            self.rect = self.image.get_rect()
            self.rect.left, self.rect.top = [self.Loc_x, self.Loc_y]
            self.X_Speed = 0
            self.Y_Speed = 0
    def FightAnimation(self,character):
    #      Monster Fight Animation
        if character.Loc_x &lt;= self.Loc_x + 25 and character.Loc_x &gt;= self.Loc_x - 25:
            if character.Loc_y &lt;= self.Loc_y + 25 and character.Loc_y &gt;= self.Loc_y - 25:
                if(self.Fighting == False):
                    self.LastFrame1 = time.clock()
                    self.Fighting = True
                    if (self.frame1 &lt; len(self.fighting_frame)):
                        self.Flag = False
                        self.image = self.fighting_frame[self.frame1]
                        self.image = pygame.transform.scale(self.image, (60, 60))
                        self.orgimage = self.image
                        if (self.frame1 == 3):
                            character.Current_HP -= 20
                        self.frame1 += 1
                    else:
                        self.frame1 = 0
            else:
                if (self.frame1 != 0):
                    self.frame1 = 0
                self.Flag = True
        else:
            if (self.frame1 != 0):
                self.frame1 = 0
                self.image = self.fighting_frame[self.frame1]
                self.image = pygame.transform.scale(self.image, (60, 60))
                self.orgimage = self.image
            self.Flag = True
        if self.Fighting and time.clock() - self.LastFrame1 &gt; self.TimeBetweenAtkFrames:
            self.Fighting = False
</code></pre>

<p>If there is anything else you'd need to know just tell me and I will add it
If this is really messy I am sorry its the first time I am using StackOverFlow website :$</p>

<p>Somewhere in your code, you "overwrite" the name <code>Monster</code>, which then no longer points to your class.</p>

<p>Make sure you're not doing a <code>Monster = whatever</code> anywhere in your code.</p>

<p>Also, note that <code>Current_HP</code>, <code>Max_Hp</code> etc. are class members, not instance members, so if you chance <code>Current_HP</code> on a <code>Monster</code> instance, you change it for <em>all</em> <code>Monster</code> instances.</p>

python pygame