GameMaker: Studio

GameMaker: Studio

データを表示:
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.
< >
1-2 / 2 のコメントを表示
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
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).
< >
1-2 / 2 のコメントを表示
ページ毎: 1530 50

投稿日: 2013年2月25日 19時36分
投稿数: 2