Thus, I am having trouble activating the sound when I press a key.
what i still
if event.type == pygame.key(K_a): self.sound.play()
I get an error code called global name "K_a" that is not defined.
If anyone can help me fix this code? Thanks!
pygame.K_a. : if event.type == pygame.key(pygame.K_a):. , , , pygame . pygame : from pygame import *. pygame.key, . : if event.type == pygame.K_a:
pygame.K_a
if event.type == pygame.key(pygame.K_a):
from pygame import *
if event.type == pygame.K_a: