Perfect Button Release

Shoot with X only
Version1.0
Authorjefex2k1
Publish DateFri, 6 Nov 2020 - 08:56
Last UpdateFri, 6 Nov 2020 - 08:56
Downloads655
RATE


5

1

Code: Select all
/*Perfect Button Release
-Hold Square to Shoot, the controller will automatically release on vibration
-Only works in Park/Rec/Pro-Am no offline games like mycourt. Needs delay to work.
-Should work for all 2k games
-Vibration needs to be on
-Adjust Delay by holding Square and Taping Left or Right
 
*/

 
int delay = 21
 
main
{
    if(get_rumble(RUMBLE_A) || get_rumble(RUMBLE_B))
    {
        combo_run(wait_time);
    }
 
      if(get_val(PS4_SQUARE))
    {
        if(event_press(PS4_LEFT))
        {
            delay--;
            combo_run(RUMBLE);
        }
 
        if(event_press(PS4_RIGHT))
        {
            delay++;
            combo_run(RUMBLE);
        }
    }
}
 
combo wait_time
{
    wait(delay);
    set_val(PS4_SQUARE, 0):
    wait(100);
    wait(200):
}
 
combo RUMBLE
{
    set_rumble(RUMBLE_A, 50);
    wait(200);
    set_rumble(RUMBLE_A, 0);
}