Is it me or is pygame.key.get_pressed() not working?
- by user1321527
okay, so I am making a basic space-ship game.
I can't get rotation to work because it scrambles the bitmap, but that's for another question.Should I even use a gif? any other filetype suggestions?
back to the actual point here, so:
k = pygame.key.get_pressed()
yeah, self explanatory. this doesn't work, as it returns each key as pressed.
so, somewhere else:
d = k[pygame.K_d]
and another line:
print d
and another:
if d:
So, k returns as each key on the keyboard pressed.
d returns 0 indefinitely, whether or not d is pressed.
d is always 0.
the statement about d therefore is never true.
Why is this happening?