D-Pad Sensitivity

This is for situations that call for many quick button presses in a row on the D-Pad. It helps when you only want to get the direction intended and do so by not allowing other directions to be registered while you press the direction you want. Always runs, so no activate/deactivate. For all Playstation, Xbox and Wii controllers.
Version1.00
AuthorJ.Guza
Publish DateFri, 29 Jul 2016 - 12:31
Last UpdateFri, 29 Jul 2016 - 12:31
Downloads43
RATE


0

0

Code: Select all
//____________________                                                   
//-[D-PAD SENSITIVITY]                                                [Always On]   6
//********************                                                              6
//This is for situations that call for many quick button presses in a row on the    6
//D-Pad. It helps when you only want to get the direction intended and do so by     6
//not allowing other directions to be registered while you press the direction      6                                                                                   
//you want.                                                                         6
 
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@[ DEFINES ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 
//DEFINE (0) | PS4_PS | PS3_PS | XB1_XBOX | XB360_XBOX                 
//DEFINE (1) | PS4_SHARE | PS3_SELECT | XB1_VIEW | XB360_BACK                     //AUTO SPRINT ...1.... [AUTO SPRINT'S Activate/Deactivate]
//DEFINE (2) | PS4_OPTIONS | PS3_START | XB1_MENU | XB360_STAR  //SINGLE & DOUBLE TAP R1/RB/(3) ...2.... [AUTO SPRINT'S Activate/Deactivate]
//DEFINE (3) | PS4_R1 | PS3_R1 | XB1_RB | XB360_RB                              //HAIR TRIGGERS ...3.... [AUTO SPRINT'S Activate/Deactivate]
//DEFINE (4) | PS4_R2 | PS3_R2 | XB1_RT | XB360_RT             //LANDING GEAR/SIRENS/KERS BOOST ...4.... [Activate/Deactivate]
//DEFINE (5) | PS4_R3 | PS3_R3 | XB1_RS | XB360_RS             //LANDING GEAR/SIRENS/KERS BOOST ...5.... [Always On]                               
//DEFINE (6) | PS4_L1 | PS3_L1 | XB1_LB | XB360_LB                          //D-PAD SENSITIVITY ...6.... [Always On]
//DEFINE (7) | PS4_L2 | PS3_L2 | XB1_LT | XB360_LT                              //TURBO CROSS/A ...7.... [Always On]
//DEFINE (8) | PS4_L3 | PS3_L3 | XB1_LS | XB360_LS                                 //TURBO JUMP ...8.... [Always On]
//DEFINE (9) | PS4_RX | PS3_RX | XB1_RX | XB360_RX                          //CLOSE APPLICATION ...9.... [Activate Only]
//DEFINE (10)| PS4_RY | PS3_RY | XB1_RY | XB360_RY                //QUICK ONLINE PUBLIC SESSION ...10... [Activate Only]             
//DEFINE (11)| PS4_LX | PS3_LX | XB1_LX | XB360_LX           //QUICK ONLINE INVITE ONLY SESSION ...10+.. [Activate Only] 
//DEFINE (12)| PS4_LY | PS3_LY | XB1_LY | XB360_LY                 //THIRD VIEW AIM SENSITIVITY ...11... [Activate Only] 
//DEFINE (13)| PS4_UP | PS3_UP | XB1_UP | XB360_UP                             //COMMIT SUICIDE ...12... [Activate Only] 
//DEFINE (14)| PS4_DOWN | PS3_DOWN | XB1_DOWN | XB360_DOWN                             //SNACKS ...13... [Activate Only] 
//DEFINE (15)| PS4_LEFT | PS3_LEFT | XB1_LEFT | XB360_LEFT                              //ARMOR ...14... [Activate Only] 
//DEFINE (16)| PS4_RIGHT | PS3_RIGHT | XB1_RIGHT | XB360_RIGHT                   //PASSIVE MODE ...15... [Activate Only] 
//DEFINE (17)| PS4_TRIANGLE | PS3_TRIANGLE | XB1_Y | XB360_Y                   //VEHICLE ACCESS ...16... [Activate Only] 
//DEFINE (18)| PS4_CIRCLE | PS3_CIRCLE | XB1_B | XB360_B             
//DEFINE (19)| PS4_CROSS | PS3_CROSS | XB1_A | XB360_A               
//DEFINE (20)| PS4_SQUARE | PS3_SQUARE | XB1_X | XB360_X                                             
//DEFINE (27)| PS4_TOUCH | XB1_P4                                                                                       
 
 
 
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@[ INT's ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 
   //Int's must go below the defines, but above the init's.   
    int Button_Pressed           = 0;                                          //6
    int activateRightDpad        = FALSE;                                      //6
//---------------------------------------------------------------------------------   
main{  //Main Start (Goes below init's and before the "features").
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@[ FEATURES ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@   
 
   //D-PAD SENSITIVITY             
    if((get_val(13) || get_val(15) || get_val(14) ||                           //6 
        get_val(16)) && Button_Pressed == -1){                                 //6 
             if(get_val(13)){Button_Pressed = 13;}                             //6
        else if(get_val(14)){Button_Pressed = 14;}                             //6 
        else if(get_val(15)){Button_Pressed = 15;}                             //6 
        else if(get_val(16)){Button_Pressed = 16;}                             //6 
    }                                                                          //6
    else if((!get_val(13) && !get_val(15) && !get_val(14) &&                   //6 
             !get_val(16)) || get_val(Button_Pressed) == 0){                   //6 
             Button_Pressed = -1;                                              //6 
    }                                                                          //6 
    else if(Button_Pressed > -1){                                              //6 
         if(Button_Pressed == 13){Disable_Pad(15, 14, 16);}                    //6 
         if(Button_Pressed == 14){Disable_Pad(13, 15, 16);}                    //6 
         if(Button_Pressed == 15){Disable_Pad(13, 14, 16);}                    //6
         if(Button_Pressed == 16){Disable_Pad(13, 15, 14);}                    //6
}                                                                              //6 
//---------------------------------------------------------------------------------   
}  //Main End (Goes after the featured scripts & before the combo's).
//@@@@@@@@@@@@@@@@@@@@@@@@&@@@@@@@@[ FUNCTIONS ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 
   //Functions must be at the bottom of the script.                               
   //D-PAD SENSITIVITY
function Disable_Pad(One, Two, Three){                                         //6
    set_val(One, 0);                                                           //6
    set_val(Two, 0);                                                           //6
    set_val(Three, 0);                                                         //6
}                                                                              //6