R
RylanStylin
Guest
aight so i hate to do this but i have no idea how to fix this and ive been looking over documentation all day trying to find this out.
I am making a game on the desktop edition for windows and I want to add controller support. To learn to do it, I made a throwaway game and created an object. This is the code in the object:
///////////////
line 1: if(gamepad_button_check_pressed(4,gp_padr)) game_end();
line 2: if(gamepad_button_check_pressed(4,gp_face1)) game_end();
line 3:
line 4: if(gamepad_is_connected(4)) game_end();
////////////////
note: line x not actually written just there for visual aid
Upon starting the game, the game ends, because the gamepad is in slot 4.
if I remove the 4th line, the game does not close upon starting. Now, if I press D-pad right, nothing happens. If I press "A" on the controller, which is gp_face1, the game ends. I dont understand why gp_padr doesnt work, and why my controller is mapped to slot 4.
PLEASE SEND HELP.
I am making a game on the desktop edition for windows and I want to add controller support. To learn to do it, I made a throwaway game and created an object. This is the code in the object:
///////////////
line 1: if(gamepad_button_check_pressed(4,gp_padr)) game_end();
line 2: if(gamepad_button_check_pressed(4,gp_face1)) game_end();
line 3:
line 4: if(gamepad_is_connected(4)) game_end();
////////////////
note: line x not actually written just there for visual aid
Upon starting the game, the game ends, because the gamepad is in slot 4.
if I remove the 4th line, the game does not close upon starting. Now, if I press D-pad right, nothing happens. If I press "A" on the controller, which is gp_face1, the game ends. I dont understand why gp_padr doesnt work, and why my controller is mapped to slot 4.
PLEASE SEND HELP.
Last edited by a moderator: