How do I fix gamepads behaviour?

I’ve tried the gamepads behaviour in 2 different projects now, with 3 different controllers. The gamepad top-down movement behaviour won’t work, nor will and of the conditions/actions… Can anyone help?

Just found out it is because of the gamepad being controller 2, is there any way to fix this?

I barely touched gamepad extension so do not expect any solutions from me
But i have 3 gamepads connected and well each have it’s own number in gamepad extension
So from what i understand number represent order in which your device detects your gamepad
So are you sure it is not that you have other gamepad connected to your device?

No, I have none plugged into my device, I’m using a MacBook laptop and nothing is plugged in except the controller… It is still used as player 2 in gdevelop though.

I remember on gdevelop discord one user had exact same issue
But i am not sure was he on mac or not
So it is for sure not problem related only to you

Controller numbering is not GDevelop controlled, it’s based off the ID in your Operating system.

If your gamepad is being detected as ID 2 (or 1, which would be the second gamepad, since it starts at ID 0), there’s not anything you can do on the GDevelop side to override that.

What you could do is add something that defines a global variable called “FirstGamePad”, default it to 999, and then have an event that has a condition of “Global Variable FirstGamePad = 999” with subevents containing the condition “Any Gamepad 0 button pressed” and an action of “Set the global variable “FirstGamePad” = 0”, and do the same with 3 other subevents (for gamepad 1 through 3).

Then instead of using the gamepad ID directly in your other events, you use the Global Variable as the ID. It’ll all pull from whatever gamepad ID is detected.