Joe
Member
How would I make one value go up while another simultaneously goes down?
A bit more explanation...
I've just made an on screen keyboard and menus, i would like to be able to use the gamepads joystick axis to navigate them but the selection delay is proving frustrating.
This is basic rundown of moving (left) on the menus. I'm using an alarm to delay the navigation so when using a joystick we aren't going at the speed of light.
The idea that's in my head is to gradually decrease the alarm as the joystick axis values increases.
I'm clearly doing the opposite above, and unless you are sensitivity inverted, lol, it doesn't feel very intuitive.
Any help is greatly appreciative.
If I was unclear about something please tell me.
A bit more explanation...
I've just made an on screen keyboard and menus, i would like to be able to use the gamepads joystick axis to navigate them but the selection delay is proving frustrating.
This is basic rundown of moving (left) on the menus. I'm using an alarm to delay the navigation so when using a joystick we aren't going at the speed of light.
GML:
if alarm[0] = -1
{
if gamepad_button_check_pressed(global.gamepad_active,gp_padl) or left_axis_x < -0.5 or right_axis_x < -0.5
{
alarm[0] = 6
//do menu stuff
}
}
GML:
var left_axis_x = gamepad_axis_value(global.gamepad_active,gp_axislh);
var left_axis_y = gamepad_axis_value(global.gamepad_active,gp_axislv);
var left_axis_timer = point_distance(0,0,left_axis_x,left_axis_y);
//not sure where to go from here
alarm[0] = abs(left_axis_timer)*10
Any help is greatly appreciative.
If I was unclear about something please tell me.