I am trying to make a score board in pygame.
score = 0 while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() if event.type == MOUSEBUTTONDOWN: time.sleep(.2) screen.fill(w) score = score + 10 score1 = str(score) text = "Score : "+score1 myfont = pygame.font.SysFont("monospace", 15) label = myfont.render(text, 1, b) screen.blit(label, (10,10)) pygame.display.update() I don't want the player to be able to just hold down the mouse button down and the scoreboard keep counting. Is there anyway that I could do this? I am thinking of just for a first use game, counting how many clicks a person makes and then maybe calculate clicks per minute or something simple like that.
time.sleep(2)in your script?