I have searched for other similiar threads but nothing came up. what i want to be able to is blit a sprite onto the window for lets say 5 seconds (5000 milliseconds) and at when time is up, it unblits it. thank you.
class Flag():
def Flagrun(self):
flaggen = str(randint(1,4))
global milliseconds
global flagactive
if flaggen == '1':
flag_x = 58
flag_y = 89
elif flaggen == '2':
flag_x = 464
flag_y = 82
elif flaggen == '3':
flag_x = 343
flag_y = 215
elif flaggen == '4':
flag_x = 66
flag_y = 535
window.blit(flag, (flag_x,flag_y))
collisiondet()
milliseconds += clock.tick_busy_loop(60)
print(milliseconds)
flagactive = 'No'