timeblade0 Feb 25, 2013 @ 7:36pm
Map xbox controls to keyboard
Is there a way to map xbox controls to keyboard keys?
For example, pressing A on the xbox controller would press Z on the keyboard.
Showing 1-2 of 2 comments
< >
pxNeon Feb 25, 2013 @ 8:37pm 
You can have that action be a boolean value, and have it turn true or false depending on when it occurs. For example:

//Creation Event
right = false
global.right = vk_right

//Step Event
right = keyboard_check(global.right)

if joystick_exists(1) {
switch (joystick_direction(1)) {
case vk_numpad6:
right = true;
break;
}}

That way you can do both the 360 and keyboard controls at the same time. Check the documentation for the joystick functions to understand how it all works there. If you want to see an example of this in action, check out my game, ORA.
http://steamcommunity.com/sharedfiles/filedetails/?id=101432890&tscn=1350763601
M.S.T.O.P. Feb 26, 2013 @ 11:54pm 
I would like to add that you should look into the new Gamepad functions instead of the old Joystick functions. The latter aren't 100% compatible with Xbox 360 controllers (i.e. they can't read LT and RT inputs correctly).
Showing 1-2 of 2 comments
< >
Per page: 15 30 50
Date Posted: Feb 25, 2013 @ 7:36pm
Posts: 2