Adjustable Anti Recoil?

Gtuner IV general support. Operation, questions, updates, feature request.

Adjustable Anti Recoil?

Postby EliteEwok » Fri Dec 07, 2018 2:08 pm

Any scripts that would work for PUBG on PS4?

Thanks and sorry if its already been asked.
User avatar
EliteEwok
Staff Sergeant
Staff Sergeant
 
Posts: 10
Joined: Fri Dec 07, 2018 1:30 pm

Re: Adjustable Anti Recoil?

Postby J2Kbr » Sat Dec 08, 2018 7:57 am

I play with mouse directly plugged on the Titan Two and couple days ago I was playing around with anti-recoil on PUBG, find out that the anti-recoil, to be the most effective, should increase the force dynamically, based on how long you press the fire button, so this is what I did:
Code: Select all
main {
    if(get_val(BUTTON_5)) {
        combo_run(Rapidfire);
        mxyconverter_voffset(clamp(time_active(BUTTON_5)/17, 6, 23));
    } else if(event_release(BUTTON_5)) mxyconverter_voffset(0);
}
 
combo Rapidfire {
    set_val(BUTTON_5, 100.0);
    wait(32);
    set_val(BUTTON_5, 0.0);
    wait(15);
    set_val(BUTTON_5, 0.0);
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 15971
Joined: Tue Mar 18, 2014 1:39 pm

Re: Adjustable Anti Recoil?

Postby EliteEwok » Sun Dec 09, 2018 6:12 am

I really wanted one I could adjust on the fly, I used to use this on my old device plus - any chance of converting it for titan two?


Code: Select all
//DECLARARATIONS - define
 
define save       =  2;   // XB1_MENU - PS4_OPTIONS
//-------------------------------------------------------------------------------------------
define Scope_only = TRUE; // if TRUE Antirecoil IS ON only when scoping - if FALSE, is always ON
//-------------------------------------------------------------------------------------------
define UP         = 13;     
define DOWN       = 14;   
define LEFT       = 15;
define RIGHT      = 16
//-------------------------------------------------------------------------------------------
 
//VARIABLES - int
 
int recoil_onoff  = TRUE; // if TRUE Antirecoil is ON by default - if FALSE, OFF by default
int ANTI_RECOIL;
int ANTI_RECOIL_H; 
int anti_recoil;
int anti_recoil_H;
int AR_Release;
int fire_button;
int scope_button;
 
//-------------------------------------------------------------------------------------------
 
//INITIALIZATION - init
 
init{
 
    if(get_console() == PIO_PS3) {
        fire_button  = 3;
        scope_button = 6;
    }else {
        fire_button  = 4;
        scope_button = 7;
    }
 
    ANTI_RECOIL   = get_pvar(SPVAR_2, -100, 100, 30);
    ANTI_RECOIL_H = get_pvar(SPVAR_3, -100, 100, 0);
    AR_Release = get_pvar(SPVAR_4, -100, 100, 50);   
}
 
//-------------------------------------------------------------------------------------------
 
//MAIN BLOCK ROUTINES
 
main { 
 
    if(event_press(XB1_LT)) {
        combo_run(Tap_1);
        combo_run(Turbo_2);
    }
    if((get_val(XB1_LT)) >= 95) {
        set_val(XB1_LB, 100);
    }
    if(get_val(XB1_RS)) {
        combo_run(Tap_3);
    }
 
    if(get_val(scope_button) && event_press(save)){
        combo_run(vibrate);
        set_pvar(SPVAR_2, ANTI_RECOIL);
        set_pvar(SPVAR_3, ANTI_RECOIL_H);
        set_val(save, 0);
    }
    if(get_val(7)){
        if(event_press(UP)){
            ANTI_RECOIL = ANTI_RECOIL+ 1; AR_Release = AR_Release+ 1;
        }
        if(event_press(DOWN)) {
            ANTI_RECOIL = ANTI_RECOIL- 1; AR_Release = AR_Release- 1;
        }
        set_val(UP,0); set_val(DOWN,0);
 
        if(event_press(LEFT)){
            ANTI_RECOIL_H = ANTI_RECOIL_H+ 1;
        }
        if(event_press(RIGHT)) {
            ANTI_RECOIL_H = ANTI_RECOIL_H- 1;
        }
        set_val(LEFT,0); set_val(RIGHT,0);
 
    }
    if(!Scope_only || get_val(scope_button) && get_val(fire_button )) {
        combo_run(AntiRecoil);
    }
 
    if( abs(get_val(10)) > AR_Release || abs(get_val(9)) > AR_Release) { 
        combo_stop (AntiRecoil);
    }
}
//-------------------------------------------------------------------------------------------
 
//COMBO BLOCKS
 
combo vibrate {
    set_rumble(RUMBLE_A, 100);
    wait(300);
    reset_rumble();
    }
combo Tap_1 {
    set_val(XB1_LT, 0);
    wait(400);
    set_val(XB1_LT, 100);
    wait(50);
    set_val(XB1_LT, 100);
}
 
combo Turbo_2 {
    set_val(XB1_LT, 100);
    wait(50);
    set_val(XB1_LT, 0);
}
 
combo Tap_3 {
    set_val(XB1_X, 0);
    wait(10);
    set_val(XB1_X, 100);
    wait(1500);
    set_val(XB1_X, 100);
}
combo AntiRecoil { // This combo must be the last one
    if(recoil_onoff) {
    anti_recoil = get_val(10) + ANTI_RECOIL;
    if(anti_recoil > 100) anti_recoil = 100;
    set_val(10, anti_recoil);
    anti_recoil_H = get_val(9) + ANTI_RECOIL_H;
    if(anti_recoil_H > 100) anti_recoil_H = 100;
    set_val(9, anti_recoil_H);
    }
}
User avatar
EliteEwok
Staff Sergeant
Staff Sergeant
 
Posts: 10
Joined: Fri Dec 07, 2018 1:30 pm

Re: Adjustable Anti Recoil?

Postby J2Kbr » Tue Dec 11, 2018 3:49 pm

Converted using the back compatibility header file.
Code: Select all
#include <titanone.gph>
 
//DECLARARATIONS - define
 
define save       =  PS4_OPTIONS;   // XB1_MENU - PS4_OPTIONS
//-------------------------------------------------------------------------------------------
define Scope_only = TRUE; // if TRUE Antirecoil IS ON only when scoping - if FALSE, is always ON
//-------------------------------------------------------------------------------------------
define UP         = PS4_UP;     
define DOWN       = PS4_DOWN;   
define LEFT       = PS4_LEFT;
define RIGHT      = PS4_RIGHT; 
//-------------------------------------------------------------------------------------------
 
//VARIABLES - int
 
int recoil_onoff  = TRUE; // if TRUE Antirecoil is ON by default - if FALSE, OFF by default
int ANTI_RECOIL;
int ANTI_RECOIL_H; 
int anti_recoil;
int anti_recoil_H;
int AR_Release;
int fire_button;
int scope_button;
 
//-------------------------------------------------------------------------------------------
 
//INITIALIZATION - init
 
init{
 
    if(get_console() == PIO_PS3) {
        fire_button  = PS4_R1;
        scope_button = PS4_L1;
    }else {
        fire_button  = PS4_R2;
        scope_button = PS4_L2;
    }
 
    ANTI_RECOIL   = get_pvar(SPVAR_2, -100, 100, 30);
    ANTI_RECOIL_H = get_pvar(SPVAR_3, -100, 100, 0);
    AR_Release = get_pvar(SPVAR_4, -100, 100, 50);   
}
 
//-------------------------------------------------------------------------------------------
 
//MAIN BLOCK ROUTINES
 
main { 
 
    if(event_press(XB1_LT)) {
        combo_run(Tap_1);
        combo_run(Turbo_2);
    }
    if((get_val(XB1_LT)) >= 95) {
        set_val(XB1_LB, 100);
    }
    if(get_val(XB1_RS)) {
        combo_run(Tap_3);
    }
 
    if(get_val(scope_button) && event_press(save)){
        combo_run(vibrate);
        set_pvar(SPVAR_2, ANTI_RECOIL);
        set_pvar(SPVAR_3, ANTI_RECOIL_H);
        set_val(save, 0);
    }
    if(get_val(7)){
        if(event_press(UP)){
            ANTI_RECOIL = ANTI_RECOIL+ 1; AR_Release = AR_Release+ 1;
        }
        if(event_press(DOWN)) {
            ANTI_RECOIL = ANTI_RECOIL- 1; AR_Release = AR_Release- 1;
        }
        set_val(UP,0); set_val(DOWN,0);
 
        if(event_press(LEFT)){
            ANTI_RECOIL_H = ANTI_RECOIL_H+ 1;
        }
        if(event_press(RIGHT)) {
            ANTI_RECOIL_H = ANTI_RECOIL_H- 1;
        }
        set_val(LEFT,0); set_val(RIGHT,0);
 
    }
    if(!Scope_only || get_val(scope_button) && get_val(fire_button )) {
        combo_run(AntiRecoil);
    }
 
    if( abs(get_val(PS4_RY)) > AR_Release || abs(get_val(PS4_RX)) > AR_Release) { 
        combo_stop (AntiRecoil);
    }
}
//-------------------------------------------------------------------------------------------
 
//COMBO BLOCKS
 
combo vibrate {
    set_rumble(RUMBLE_A, 100);
    wait(300);
    reset_rumble();
    }
combo Tap_1 {
    set_val(XB1_LT, 0);
    wait(400);
    set_val(XB1_LT, 100);
    wait(50);
    set_val(XB1_LT, 100);
}
 
combo Turbo_2 {
    set_val(XB1_LT, 100);
    wait(50);
    set_val(XB1_LT, 0);
}
 
combo Tap_3 {
    set_val(XB1_X, 0);
    wait(10);
    set_val(XB1_X, 100);
    wait(1500);
    set_val(XB1_X, 100);
}
combo AntiRecoil { // This combo must be the last one
    if(recoil_onoff) {
    anti_recoil = get_val(PS4_RY) + ANTI_RECOIL;
    if(anti_recoil > 100) anti_recoil = 100;
    set_val(PS4_RY, anti_recoil);
    anti_recoil_H = get_val(PS4_RX) + ANTI_RECOIL_H;
    if(anti_recoil_H > 100) anti_recoil_H = 100;
    set_val(PS4_RX, anti_recoil_H);
    }
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 15971
Joined: Tue Mar 18, 2014 1:39 pm


Return to Gtuner IV Support (Titan Two)

Who is online

Users browsing this forum: No registered users and 10 guests