I was writing the code for the introduction to a game I was making, here introduction being blitting a series of images with a time delay of 4 seconds in between them. The problem is, using the time.sleep method also messes with the main loop and the program thus "hangs" for that period. Any suggestions please? [Intro and TWD are sound objects]
a=0
while True:
for event in pygame.event.get():
if event.type==QUIT:
pygame.quit()
sys.exit()
Intro.stop()
TWD.stop()
if a<=3:
screen.blit(pygame.image.load(images[a]).convert(),(0,0))
a=a+1
if a>1:
time.sleep(4)
Intro.play()
if a==4:
Intro.stop()
TWD.play()
pygame.display.update()