I have a function, and whenever it is called one of the lines has it run sound.play()
, which works fine the first time. as soon as i hit the loop the second time, it doesn't do anything. just passes by the sound. but everything else works.
def s_js():
global plane
global has_food
global has_sound
global s_disable
global x
plane -= 10
has_food = False
has_sound = False
scary.play()
while x != 20:
chosenimg = pygame.image.load(s.crowjs[x])
newimg = pygame.transform.scale(chosenimg, (1400, 750))
screen.blit(newimg, (0, 0))
pygame.display.flip()
time.sleep(.03)
x += 1
s.loc = 4
s_disable = False