Y
Yvalson
Guest
So I'm trying to add support for gamepads into my game. and I'm currently trying to figure out if my gamepad is getting detected using this code:
it's the same code as used in this docs:
https://docs.yoyogames.com/source/dadiospice/002_reference/mouse, keyboard and other controls/gamepad input/gamepad_is_connected.html
however when I launched it the game put out this message: 0111
effectively saying there are 3 gamepads connected.
is this correct? or is there something wrong in the code or something?
I disconnected any possible bluetooth device from the phone so that can't be the problem either
the controller i'm using is the PS4 Pro dualshock controller
Code:
var gp_num = gamepad_get_device_count();
for (var i = 0; i < gp_num; i++;)
{
if gamepad_is_connected(i) global.gp[i] = true else global.gp[i] = false;
}
show_message(string(global.gp[0]) + string(global.gp[1]) + string(global.gp[2]) + string(global.gp[3]))
https://docs.yoyogames.com/source/dadiospice/002_reference/mouse, keyboard and other controls/gamepad input/gamepad_is_connected.html
however when I launched it the game put out this message: 0111
effectively saying there are 3 gamepads connected.
is this correct? or is there something wrong in the code or something?
I disconnected any possible bluetooth device from the phone so that can't be the problem either
the controller i'm using is the PS4 Pro dualshock controller
Last edited by a moderator: