I know this is a simple problem and I could just use the time
function or something, but it's somehow still a problem to me. So I have this:
letter = pygame.image.load('w00.png')
screen.blit(letter, (letter_x, 625))
letter_x += 30
letter = pygame.image.load('e-2.png')
screen.blit(letter, (letter_x, 625))
letter_x += 30
letter = pygame.image.load('l-2.png')
screen.blit(letter, (letter_x, 625))
letter_x += 30
letter = pygame.image.load('c-2.png')
screen.blit(letter, (letter_x, 625))
letter_x += 30
letter = pygame.image.load('o-2.png')
screen.blit(letter, (letter_x, 625))
letter_x += 30
letter = pygame.image.load('m-2.png')
screen.blit(letter, (letter_x, 625))
letter_x += 30
letter = pygame.image.load('e-2.png')
screen.blit(letter, (letter_x, 625))
Between every time I blit
the letter(I'm trying to make a sentence write itself one letter by one letter), I want it to stop for about 0.5 sec before it continues. Problem is, everything I tried hasn't work very well.
The time.sleep()
function and the pygame.time.delay()
function and the pygame.time.wait()
function all don't work because all of those functions for some reason run before anything loads. This is all inside of a function. (def function():
)
I know that those functions run before anything loads because 1. It runs the def function():
the same as before and 2. It takes precisely the amount of time I put in the time.sleep()
longer to load.
Thanks.
EDIT:
I've tried it out and apparently it doesn't even run the function before it runs the pygame.time.wait()
.