i recently switched from normal bge to upbge.
in the normal bge i used
w = keyboard.events[bge.events.WKEY] == bge.logic.KX_INPUT_ACTIVE
and then:
if w:
do smt
(keyboard keys with always sensor)
but in the upbge keyboard.events is deprecated, so i tried to change it to keyboard.inputs but ran into some trouble.
-
w = keyboard.inputs[bge.events.WKEY] == bge.logic.KX_INPUT_ACTIVE doesnt work. (because inputs seems to be something different than events)
-
then i tried: wja = bge.logic.KX_INPUT_JUST_ACTIVATED in keyboard.inputs[bge.events.SKEY].queue
that seems to work. (wja = w just activated)
-
but w = bge.logic.KX_INPUT_ACTIVE in keyboard.inputs[bge.events.SKEY].queue doesnt work.
-
KX_INPUT_NONE also doesnt work.
is this a bug or am i doing something wrong? (or how do you correctly use keys with an always sensor in the upbge)