title: How do I make a reload timer for my player's weapon in pygame?
body: <p>So I'm making a top down shooter, left click shoots, right click reloads the gun. I want to make it so the player can't shoot while reloading and I don't want the screen to show that the player has full ammo until AFTER they have fully reloaded (just like any fps game). Does anyone know how I can implement this? Thanks for any feedback :)</p>
  
  <p>Here's my mouse / firing code:</p>
  
  <pre><code>if event.type == pygame.MOUSEBUTTONDOWN and pygame.mouse.get_pressed() == (1, 0, 0) and ammo &gt; 0:
      ammo -= 1
      bullet = Bullet()
      all_sprites_list.add(bullet)
      bullet_list.add(bullet)
  elif event.type == pygame.MOUSEBUTTONDOWN and pygame.mouse.get_pressed() == (0, 0, 1):
      pygame.time.wait(1000)
      ammo = full_ammo
  </code></pre>
  
  <p>So I know the <code>pygame.time.wait(1000)</code> freezes the whole program for an entire second, I had it in there thinking it would delay setting the <code>ammo = full_ammo</code> but it pauses the whole game haha. Does anyone know of a function or <code>pygame.</code> whatever function that I can use to delay setting the ammo to full (simulating a reload time)?</p>