[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] move problems



oops... that was why my spaceship wasn't moving... lol.

--- On Thu, 4/9/09, Ian Mallett <geometrian@xxxxxxxxx> wrote:

From: Ian Mallett <geometrian@xxxxxxxxx>
Subject: Re: [pygame] move problems
To: pygame-users@xxxxxxxx
Date: Thursday, April 9, 2009, 8:53 PM

On Thu, Apr 9, 2009 at 2:48 PM, Yanom Mobis <yanom@xxxxxxxxxxxxxx> wrote:
if key[K_RIGHT]:
        spaceship.speed=(spaceship.speed[0]+10, spaceship.speed[1])
        print("K_RIGHT") #debug
    if key[K_RIGHT]:
        spaceship.speed=(spaceship.speed[0]-10, spaceship.speed[1])
        print("K_LEFT") #debug
if key[K_RIGHT]:
    move right
if key[K_RIGHT]:
    move left

Two K_RIGHT ?
That should cancel any speed changes out...