• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Controller Axes not functional

C

Captain.Sass

Guest
I'm trying to create a simple top-down shooter with GMS:2 using a controller. The only thing is, one joystick axis on the controller controls every other axis on the controller. This means if you look at the values of all four joystick axes on a controller, they would all be the same and are only controlled by one axis, so when you move the left joystick up and down they all change and wouldn't change if you tried to move despite moving the proper joysticks. I have tested this with multiple controllers and the problem is still there. My controllers work perfectly outside of GMS:2. Here's the code in my step event if it helps. I was wondering if anybody knows any way to look into the problem.
Code:
haxis = (gamepad_axis_value(0,gpaxislh));
vaxis = (gamepad_axis_value(0,gpaxislv));
haxisr = (gamepad_axis_value(0,gpaxisrh));
vaxisr = (gamepad_axis_value(0,gpaxisrv));
facing = point_direction(x,y,x+haxis,y+vaxis);
image_angle = facing;
 
C

Captain.Sass

Guest
I found the problem. At some point, the underscore was lost. Instead of "gpaxislh", it has to be "gp_axislh". Punctuation is the biggest b*tch in programming.
 

gnysek

Member
1.4 and 2.0 may share bugs if they are in runner, as it's probably the same one, or very similar.
 
Top