Python/Pygame, Where do I put my pygame.time.wait loop?
Question: So, I am in the middle of making two, very similar games (Exact details are
irrelevant right now.)

Anyway, I need to know where to insert my "pygame.time.wait" code.

The exact code I need looks like this:

    
    
    pygame.time.wait(100)
    score = score + 1
    

Currently, my code looks like so:

    
    
    import sys, pygame
    
    from pygame.locals import *
    
    pygame.init()
    
    size = width, height = 800,500
    screen = pygame.display.set_mode(size)
    
    pygame.display.set_caption("One Score (Created by - Not Really Working Lamp Productions:)")
    
    WHITE = (255,255,255)
    score = 0
    screen.fill (WHITE)
    
    myfont = pygame.font.SysFont("monospace", 16)
    
    scoretext = myfont.render("Score = "+str(score), 1, (0,0,0))
    screen.blit(scoretext, (5, 10))
    
    disclaimertext = myfont.render("Copyright, 2013, Not Really Working Lamp Productions.", 1, (0,0,0))
    screen.blit(disclaimertext, (5, 480))
    
    while 1:
        for event in pygame.event.get():
            pygame.display.flip()
            if event.type == pygame.QUIT:sys.exit()
    

The problem is though, that I don't know WHERE in this code I should put my
pygame.time.wait code. Could anybody fill me in? (I think it goes in the
"while 1:" loop, but I don't know where.)


Answer: Good afternoon. You should put your 'wait code' into the body of FOR circle:

    
    
    while 1:         
        for event in pygame.event.get():
            pygame.display.flip()
            if event.type == pygame.QUIT:sys.exit()
            pygame.time.wait(100)
            score = score + 1
    

