I'm having some troubble about getting a double-click (arrow RIGHT) in pygame/python. Here is my code for now:
timer = 0 exit = True dt = 0.1 ` while exit: for event in pygame.event.get(): if event.type == pygame.QUIT: exit = False if event.type == pygame.KEYDOWN: if event.key == seta_direita: print("Moveu") if timer == 0: # First click. timer = 0.1 # Start the timer. #Click again before 0.3 seconds to double click. elif timer < 0.3: print('Dash') # Increase timer after mouse was pressed the first time. elif timer != 0: timer += dt pygame.time.delay(100) # Reset after 0.3 seconds. elif timer >= 0.3: timer = 0 So there is.
pygame.time.delay(100)should be removed completely. Don't just copy and paste code from SO, you have to understand how it works.