I am making a pygame code where a helicopter sprite changes its images 3 times to make it look like the propellers are moving. I came up with something like this:
if heli == 1:
self.surf = pygame.image.load("Heli_1.png")
if heli == 2:
self.surf = pygame.image.load("Heli_2.png")
if heli == 3:
self.surf = pygame.image.load("Heli_3.png")
I need to make it so that every say... .05 seconds the variable heli changes from 1 to 2, 2 to 3, and then 3 to 1. I tried looking into the time module, but I couldn't find any answers. Update: I have tried using time.sleep, but it will only display the image as the last one called (Heli_3).