Liam Earles
Member
Hello! I am trying to code analogue stick controls to simulate the keyboard Up and Down buttons and no matter how hard I try when I test out my project for half of the time, the object always wants to go down. This is the code I have for when the axis value is moved:
And this is the code for when the axis value is released:
I am trying different ways on how to do it, but they don't work the way I want it to work. So comment for help.
Code:
if gamepad_axis_value(0, gp_axislv) > 0
{
keyboard_key_press(vk_down)
}
Code:
if gamepad_axis_value(0, gp_axislv) > 0
{
keyboard_key_release(vk_down)
}