Analog Sticks to "Digital"

When you move either analog stick 15% in any direction it will read as being pressed 100%. *As noted in the script, DO NOT use the right analog stick code for FPS or any game that uses the right analog stick for aiming. Best used for Fighting games and Sports games.
Versionv1.02
Authorfathead2k
Publish DateThu, 13 Feb 2014 - 18:15
Last UpdateThu, 13 Feb 2014 - 18:15
Downloads438
RATE


1

0

Release Notes: Special thanks to EODCM & alex921 from the CronusMAX forums for the idea and execution of the "else if" coding.
Code: Select all
 
 
define LX=PS3_LX// <-- Change ALL 4 to the controller of choice (i.e. XB360_LX or XB1_LX or PS4_LX etc)
define LY=PS3_LY;
define RX=PS3_RX;
define RY=PS3_RY;
 
 
 main {
 
  //  Left Analog Stick
 
    if(get_val(LX) > 15)
      set_val(LX, 100);
        else if(get_val(LX)< 100)
        set_val(LX, 0);
    if(get_lval(LX) < -15)
      set_val(LX, -100);   
        else if(get_val(LX)<  -100)
        set_val(LX, 0);
 
    if(get_val(LY) > 15)
      set_val(LY, 100);   
        else if(get_val(LY)<100)
        set_val(LY, 0);
   if(get_lval(LY) < -15)
      set_val(LY, -100);       
        else if(get_val(LY)< -100)
        set_val(LY, 0);
 
 
  //  Right Analog Stick (*DO NOT USE THIS PART ON FPS OR ANY GAME THAT USES RIGHT ANALOG AS AIM)
 
    if(get_val(RX) > 15)
      set_val(RX, 100);
        else if(get_val(RX)< 100)
        set_val(RX, 0);
    if(get_lval(RX) < -15)
      set_val(RX, -100);
        else if(get_val(RX)<  -100)
        set_val(RX, 0);
 
    if(get_val(RY) > 15)
      set_val(RY, 100);
        else if(get_val(RY)< 100)
        set_val(RY, 0);
    if(get_lval(RY) < -15)
      set_val(RY, -100);
        else if(get_val(RY)< -100)
        set_val(RY, 0);
 
}