I have a game doing a countdown, at the end of the countdown I want to display the text "Missle Away!" on the screen for 3 seconds. I have the code below but when I run it, the text never displays. If I remove the delay, the text displays but of course it does not disappear after 3 seconds.
def missle_call():
global missle_active
global active
while missle_active == True:
gameDisplay.blit(radarbg, (700, 100)) # clears the countdown text by writing the background image over it
TextSurf, TextRect = big_text_objects("Missle Away!" , large_base_font) # set font & text
TextRect.center = (950, 300) # set location of text
gameDisplay.blit(TextSurf, TextRect) # render text to screen
pygame.time.delay(3000) # continue to show text on screen for 3 seconds
gameDisplay.blit(radarbg, (700, 100)) # cover text on display by blitting the background image on it
active = False # reset the launch execution to not launched
return
else:
return