Remapping functions to keys...
by Mike Daly · in Torque Game Engine Advanced · 11/08/2007 (4:06 pm) · 0 replies
I'm having an issue with key bindings and I'm not sure if this is code or script based.
I have my 'w' key set to the generic engine-based moveForward function. If I enter a trigger, I'd like to remap the 'w' key to do something different (ex. move up in the z direction rather than in the forward direction).
The problem that I am encountering is..
If the player is holding the 'w' key when he enters a trigger that remaps 'w' to a different function, the function that gets remapped to the 'w' isn't called until 'w' is released and pressed again. (All this is scripting, not C++)
I just need to be pointed in the right direction.
Thanks,
Mike
I have my 'w' key set to the generic engine-based moveForward function. If I enter a trigger, I'd like to remap the 'w' key to do something different (ex. move up in the z direction rather than in the forward direction).
The problem that I am encountering is..
If the player is holding the 'w' key when he enters a trigger that remaps 'w' to a different function, the function that gets remapped to the 'w' isn't called until 'w' is released and pressed again. (All this is scripting, not C++)
I just need to be pointed in the right direction.
Thanks,
Mike