Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | loml666 |
I have problems with the combination of keys to control some actions in my player, i want do this: with the key “p” not move and after with up or down move the player and other object, my program not move nothing.
I need help with the code:
if event is InputEventKey:
if event.is_pressed() and event.scancode == KEY_P:
move=false
if event.is_action_pressed("ui_down"):
obj.transform.origin.z+=6
self.transform.origin.z+=1
if event.is_action_pressed("ui_up"):
obj.transform.origin.z-=6
self.transform.origin.z-=1
if !event.is_pressed() and event.scancode == KEY_P:
move=true