Python Forum
[PyGame] Pygame, how to run an if statement only once, help!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Pygame, how to run an if statement only once, help!
#2
said_yeah = False
if score_value == 10 and said_yeah == False:
   yeah = pygame.mixer.Sound("PointsSound.wav")
   yeah.set_volume(0.1)
   yeah.play()
   said_yeah = True
Reply


Messages In This Thread
RE: Pygame, how to run an if statement only once, help! - by michael1789 - Jan-28-2020, 07:10 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020