title: Spawning Multiple of the same sprite
body: <p>I am currently working on a game called Table Wars, a turn based strategy game for two players. Progress has been going smoothly, until I ran into a problem with spawning units.</p>
  
  <p>The program won't spawn multiple of the same unit, or respawn new ones after the old ones die.</p>
  
  <p>Here is some information that may help:</p>
  
  <ul>
  <li>Each class is stored in a variable: (<code>redI = Red_Infantry()</code>)</li>
  <li>All functions are stored in the main loop.</li>
  <li>The sprite classes have hard-coded X and Y values, used when spawning units and moving units.</li>
  </ul>
  
  <p>What should I do?</p>
  
  <p>As requested, here is the class for the Red Infantry:</p>
  
  <pre><code>class Red_Infantry(pygame.sprite.Sprite):
      def __init__(self):
          pygame.sprite.Sprite.__init__(self)
          self.image, self.rect = load_image('Soldier_red.png', -1)
          self.selected = 0
          self.area = screen.get_rect()
          self.rect.topleft = (100, 300)
          self.health = 100 #Soldiers are have mediocre toughness.
          self.attack_damage = 25
          self.range_maximum = 20 #in pixels, this is melee range
          self.range_minimum = 0
          self.update()
      def update(self):
          if self.health &lt;= 0:
              self.kill()
  </code></pre>
  
  <p>and the code to spawn this unit:</p>
  
  <pre><code>if spawned_units &lt; 3 and PHASE == 1 and TURN == 'Red':
      if REDGOLD &lt; 10:
          print "Out of money! Moving to Phase 2!"
          PHASE = 2
          spawned_units = 0
      elif event.type == KEYDOWN and event.key == K_1:
          if REDGOLD &gt;= 10 and REDCOMMAND &gt;= 5:
              Sprites.append(redI)
              REDGOLD -= 10
              REDCOMMAND -= 5
              spawned_units = spawned_units + 1
          else:
              print "Not enough gold!"
  </code></pre>
  
  <p>This is similar style with all units. It performs correctly the first time, but not in the second, third, and so on, meaning I can only have one Soldier. Also, when that soldier dies via self.kill, it won't come back if I try to spawn it.</p>