A
anthropus
Guest
Hi all, everything was going good for my GML practice game until i tried getting the 2nd player to work using an xbox controller.
for the key inputs im using
(in the object's create event)
gamepad_set_axis_deadzone(0, .3);
(in a script that is being called for player 2; IS NOT WORKING)
(this player 1 script IS WORKING)
my guess is that the "1" (for the player 2 script) which defines the gamepad's "'slot' to check" is not the correct. i tried changing the usb port the xbox controller connects to; i tried changing the "1" to "2" and "3" and "4"; i tried reconnecting the gamepad; i tried restarting GMP, and its still nothing is working.
any idea on how i can correct this? how do i check which "slot" the second gamepad (xbox controller) is in?
any help?
for the key inputs im using
(in the object's create event)
gamepad_set_axis_deadzone(0, .3);
(in a script that is being called for player 2; IS NOT WORKING)
Code:
up = gamepad_axis_value(1,gp_axislv)<0 || gamepad_button_check(1,gp_padu);
down = gamepad_axis_value(1,gp_axislv>0) || gamepad_button_check(1,gp_padd);
left = gamepad_axis_value(1,gp_axislh<0) || gamepad_button_check(1,gp_padl);
right = gamepad_axis_value(1,gp_axislh>0) || gamepad_button_check(1,gp_padr);
(this player 1 script IS WORKING)
Code:
up = gamepad_axis_value(0,gp_axislv)<0 || gamepad_button_check(0,gp_padu);
down = gamepad_axis_value(0,gp_axislv>0) || gamepad_button_check(0,gp_padd);
left = gamepad_axis_value(0,gp_axislh<0) || gamepad_button_check(0,gp_padl);
right = gamepad_axis_value(0,gp_axislh>0) || gamepad_button_check(0,gp_padr);
any idea on how i can correct this? how do i check which "slot" the second gamepad (xbox controller) is in?
any help?