Re: [pygame] Capturing Multiple Keyboard Inputs

2012-01-16 Thread Silver
On 1/15/2012 8:16 PM, Ian Mallett wrote: On Sun, Jan 15, 2012 at 7:46 PM, Ryan Strunk ryan.str...@gmail.com wrote: Hello everyone, I am testing my understanding of the pygame.key module by creating a program that pans the sound of a car engine and raises/lowers its frequency. While the

Re: [pygame] Capturing Multiple Keyboard Inputs

2012-01-16 Thread Radomir Dopieralski
On Mon, Jan 16, 2012 at 20:22, Silver rockac...@gmail.com wrote: On 1/15/2012 8:16 PM, Ian Mallett wrote: On Sun, Jan 15, 2012 at 7:46 PM, Ryan Strunk ryan.str...@gmail.com wrote: Hello everyone, I am testing my understanding of the pygame.key module by creating a program that pans the

Re: [pygame] Capturing Multiple Keyboard Inputs

2012-01-16 Thread Silver
On 1/16/2012 11:35 AM, Radomir Dopieralski wrote: On Mon, Jan 16, 2012 at 20:22, Silver rockac...@gmail.com wrote: On 1/15/2012 8:16 PM, Ian Mallett wrote: On Sun, Jan 15, 2012 at 7:46 PM, Ryan Strunk ryan.str...@gmail.com wrote: Hello everyone, I am testing my understanding of the

RE: [pygame] Capturing Multiple Keyboard Inputs

2012-01-16 Thread Ryan Strunk
On 1/15/2012 8:16 PM, Ian Mallett wrote: You should use pygame.key.get_pressed() to check whether the left/up keys are pressed. Something like: while pygame.event.get(): pass key = pygame.key.get_pressed() if key[K_LEFT]: #whatever if key[K_UP]: #whatever I understand the reasoning

Re: [pygame] Capturing Multiple Keyboard Inputs

2012-01-16 Thread Ian Mallett
On Mon, Jan 16, 2012 at 4:27 PM, Ryan Strunk ryan.str...@gmail.com wrote: I understand the reasoning behind get_pressed. What's the significance of while pygame.event.get(): pass Oops. I meant: for event in pygame.event.get(): pass Is that what you use instead of the for loop to step through

Re: [pygame] Capturing Multiple Keyboard Inputs

2012-01-15 Thread Ian Mallett
On Sun, Jan 15, 2012 at 7:46 PM, Ryan Strunk ryan.str...@gmail.com wrote: Hello everyone, I am testing my understanding of the pygame.key module by creating a program that pans the sound of a car engine and raises/lowers its frequency. While the individual keys do exactly what they're