• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker How do you refer to specific gamepad slots?

Kyrieru

Member
When doing something like this;
global.gp_up = gp_padu

How do you refer to different gamepad slots? I can't find it in the manual...
 
Q

QuinnlanVos

Guest
gp_padu is a constant, you need to be checking if a gamepad button is pressed using the function

Code:
gamepad_button_check(device, button);
where "device" is the slot to check

I'd suggest looking over the manual again under "GamePad Input"
it explains

The gamepad "slots" are indexed from 0 with slots 0 - 3 inclusive being only for Xinput gamepads, ie: Xbox360 controllers and compatibles. However you can also check slots 4 - 11 inclusive for DirectInput gamepads
 

Kyrieru

Member
Yikes, this is why programming early in the morning is a bad idea...

I had already done everything, including a variable to choose which gamepad slot to use, and somehow got confused looking at my init code, rather than looking at my code that actually checks inputs.
Thanks though, was the kick in the brain I needed to realize I was being dumb.
 
Top