Thanks, I kind of just wrote the movement code in a minute or so and just forgot about it until I added the cheat where I just added that last elif statement in 'on_key_press()'.
Here it is by the way if you want to see what causes the problem and don't want to dig through the source code (without the commented out stuff.):
def on_key_press(self, key, key_modifiers): if key == arcade.key.W: self.player.change_y = PLAYER_SPEED elif key == arcade.key.S: self.player.change_y = -PLAYER_SPEED elif key == arcade.key.A: self.player.change_x = -PLAYER_SPEED elif key == arcade.key.D: self.player.change_x = PLAYER_SPEED elif key == arcade.key.UP or key == arcade.key.DOWN or key == arcade.key.LEFT or key == arcade.key.RIGHT: self.timer = 1.0 self.cheat_code.append(key)
def on_key_release(self, key, key_modifiers): if key == arcade.key.W or key == arcade.key.S: self.player.change_y = 0 elif key == arcade.key.A or key == arcade.key.D: self.player.change_x = 0
Yeah, Up-Left is higher priority than Down-Right and either way being released sets the velocity for that axis to 0. Sorry about that! ( I thought I had a solution to this but then I realised when I opened Notepad++ that it wouldn't work.)