Hey all.
I am making a python script which controlls the actions of a armature with Gamekeys. The problem is that so far I know you can’t press 2 keys at a time if you use that.
When you hold For example W key, and when still holding W key press another key, the action of the W key stops.
…
Sorry I’m terrible at explaining my problem in English. xD
Anyway, Someone understands me and know a solution?
Thanks a lot :yes:
edit
cont = GameLogic.getCurrentController()
own = cont.getOwner()
import GameKeys
running = 0
keys = cont.getSensor(“run”)
run = cont.getActuator(“Run”)
wKey = GameKeys.WKEY
aKey = GameKeys.AKEY
if keys.getKeyStatus(wKey) == GameLogic.KX_INPUT_JUST_ACTIVATED:
running = 1
elif keys.getKeyStatus(aKey) == GameLogic.KX_INPUT_JUST_ACTIVATED:
running = 0
if running == 1:
GameLogic.addActiveActuator(run, True)
else:
GameLogic.addActiveActuator(run, False)