Legacy GM Gamepad axis released?

T

Tonydaderp

Guest
Hello guys, for the past hour i've been trying to implement a gamepad released function. However, i have failed every time i tried. I even tried using input_dog, an extension. (https://marketplace.yoyogames.com/assets/243/input-dog) However, i have tried many ways to implement the extension to my own project, but to no avail. Has anyone one else used imput dog before? If not, could you plz help me come up with a gamepad_axis_released script or state?
 

RangerX

Member
The idea is to track if the joystick is pushed or not for yourself with variables.
Example when you press a joystick in my game:


if(obj_Testing.Gamepad==true) // object that check if gamepad is there
then
{
Left_Haxis=gamepad_axis_value(0,gp_axislh); // check for Axis press/release....
Left_Vaxis=gamepad_axis_value(0,gp_axislv);


if((Left_Haxis<-0.5) && DpadLeft_pressed==false) // joystick press
then
{
event_perform(ev_other,ev_user0);
DpadLeft_pressed=true; // to track its been pressed
}



Now for release you could have a condition like:


if(Left_Haxis>-0.5 && DpadLeft_pressed==true) // release
then
{
DpadLeft_pressed=false;
** do whatever **
}
 
T

Tonydaderp

Guest
hmm
Thank you! However, im not too sure i understand :|
 
Top