It actually should return ANYTHIBG BETWEEN -1 and 1, depending on how far you pushed your joystick.when I print the Key_Vertical variable It only returns 0 andCode:Key_Vertical = gamepad_axis_value(global.gamepad_index,gp_axisrv);
and It should return -1 and 0 and 1
It actually should return ANYTHIBG BETWEEN -1 and 1, depending on how far you pushed your joystick.
Are you sure global.gamepad_index refers to 0 (controller 1)?
To my eyes, your bit of code should work...
for(i = 0; i < gamepad_get_device_count(); i++)
{
if(gamepad_is_connected(i))
{
global.gamepad_index = i;
}
}