Antithesis' ADS Anti-recoil script on a Titan Two/XIM APEX/

Forum to discuss the scripts, configs and connection of XIM with the Titan devices.

Moderator: antithesis

Antithesis' ADS Anti-recoil script on a Titan Two/XIM APEX/

Postby Jalal » Sat May 26, 2018 8:08 am

hello All,

there is a script in the online resource about anti-recoil and auto fire

can some one please tell me what is the toggle of turn off/on rapid fire

also which exact value do i need to change for rapid fire

last thing if there is no Toggle about turning off and on rapid fire what is the default value ?

i play mostly COD (BO3,infinant warfare, WWII)

Thank you for your help :innocent_smile_1:
User avatar
Jalal
Sergeant Major
Sergeant Major
 
Posts: 73
Joined: Wed Apr 26, 2017 7:42 am

Re: Antithesis' ADS Anti-recoil script on a Titan Two/XIM AP

Postby antithesis » Sat May 26, 2018 8:53 am

It was not intended to be a standalone script, but peeps seem to be using it that way...

50 hold & 50 wait works fine for 99% of semiautomatic guns in 99% of games, there's no need to change that, but you can. You don't want RF enabled for automatic weapons.

I'll be uploading some new full scripts in the near future.
Official Australian retailer for Titan One, Titan Two and XIM APEX at Mod Squad
User avatar
antithesis
Colonel
Colonel
 
Posts: 1912
Joined: Sat May 28, 2016 10:45 pm

Re: Antithesis' ADS Anti-recoil script on a Titan Two/XIM AP

Postby norcal3737 » Sat May 26, 2018 5:42 pm

antithesis wrote:It was not intended to be a standalone script, but peeps seem to be using it that way...

50 hold & 50 wait works fine for 99% of semiautomatic guns in 99% of games, there's no need to change that, but you can. You don't want RF enabled for automatic weapons.

I'll be uploading some new full scripts in the near future.



Do all RF typically shoot in bursts of XX amount of shots (your RF in the AR/RF script is 10 shots)?
Is it possible to have RF engaged only for as long as you are holding ADS & Trigger, and not be set to xx amount of shots?

I tried combining your ADS AR and an ADS RF that maybe isn't tied to only shooting XX amount of shot. Does this look like both will work fine, under ADS conditions? I haven't used RF yet as I was spending some time trying to get my antirecoil right.

Code: Select all
#pragma METAINFO("antithesis ADS AR & RF", 1, 02, "antithesis")
 
fix32 RECOIL_V = 35.0;
fix32 RECOIL_H = 0.0;
fix32 RY;
fix32 RX;
 
fix32 StickNoise = 4.32;
 
bool rapidfire_toggle = FALSE;
 
main {
    if (get_val (BUTTON_5)) // only active when firing to allow for microaim adjustments without the input being filtered
    {   
        // DEADZONE REMOVER
        if(abs(get_actual(STICK_1_X)) < StickNoise) { set_val(STICK_1_X, 0.0); }
        if(abs(get_actual(STICK_1_Y)) < StickNoise) { set_val(STICK_1_Y, 0.0); }
        if(abs(get_actual(STICK_2_X)) < StickNoise) { set_val(STICK_2_X, 0.0); }
        if(abs(get_actual(STICK_2_Y)) < StickNoise) { set_val(STICK_2_Y, 0.0); }
 
    }
    // ANTI-RECOIL
    if (get_val (BUTTON_5)) //antirecoil only active when firing
    {
        AntiRecoil(STICK_1_Y,RECOIL_V);
        AntiRecoil(STICK_1_X,RECOIL_H);
    }
 
    if(event_active(BUTTON_5) && get_val(BUTTON_2)) {
        rapidfire_toggle = !rapidfire_toggle;
    }
    if(rapidfire_toggle && get_val(BUTTON_5)) {
        combo_run(Rapidfire);
    }
 
}
 
combo Rapidfire {
    set_val(BUTTON_5, 100.0);
    wait(50);
    set_val(BUTTON_5, 0.0);
    wait(15);
    set_val(BUTTON_5, 0.0);
}
 
void AntiRecoil (uint8 axis, fix32 recoil)
{
 
    RY = get_actual(STICK_1_Y);
    RX = get_actual(STICK_1_X);
 
    if (get_val(BUTTON_5) && (sqrt(RX*RX + RY*RY)) <= abs(recoil))
    {
        if(abs(RY) <= abs(recoil))
        {
            set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_val(axis));
        }
    }
}
 
User avatar
norcal3737
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Sun Apr 22, 2018 5:21 am

Re: Antithesis' ADS Anti-recoil script on a Titan Two/XIM AP

Postby antithesis » Sun May 27, 2018 12:55 am

I don't use XX shots per second in my scripts. The wait values are milliseconds, so you can be as granular as you want. Just edit the red 50 and 15 wait values in your Rapidfire combo to toy with the timing.

In my experience, 50/50 works great, I don't bother editing it in any game. Try 25/25 if you want it to ping the game faster, but the engine will only ever update it at its earliest convenience. Note that many games won't detect faster than 50ms (25/25) consistently, and your weapon may splutter.

Your ping and the game's tick-rate play a role, so it's near impossible to fine-tune RF perfectly.
Official Australian retailer for Titan One, Titan Two and XIM APEX at Mod Squad
User avatar
antithesis
Colonel
Colonel
 
Posts: 1912
Joined: Sat May 28, 2016 10:45 pm

Re: Antithesis' ADS Anti-recoil script on a Titan Two/XIM AP

Postby norcal3737 » Sun May 27, 2018 5:57 pm

Possible you could provide me the correct scripting (and on which line to add it) to make your AR & RF combo script to be only active on ADS?
User avatar
norcal3737
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Sun Apr 22, 2018 5:21 am

Re: Antithesis' ADS Anti-recoil script on a Titan Two/XIM AP

Postby antithesis » Sun May 27, 2018 10:18 pm

norcal3737 wrote:Possible you could provide me the correct scripting (and on which line to add it) to make your AR & RF combo script to be only active on ADS?


Try this -

Code: Select all
 
#pragma METAINFO("antithesis ADS AR & RF", 1, 02, "antithesis")
 
fix32 RECOIL_V = 35.0;
fix32 RECOIL_H = 0.0;
fix32 RY;
fix32 RX;
 
fix32 StickNoise = 4.32;
 
bool rapidfire_toggle = FALSE;
 
main {
    if (get_val (BUTTON_5)) // only active when firing to allow for microaim adjustments without the input being filtered
    {   
        // DEADZONE REMOVER
        if(abs(get_actual(STICK_1_X)) < StickNoise) { set_val(STICK_1_X, 0.0); }
        if(abs(get_actual(STICK_1_Y)) < StickNoise) { set_val(STICK_1_Y, 0.0); }
        if(abs(get_actual(STICK_2_X)) < StickNoise) { set_val(STICK_2_X, 0.0); }
        if(abs(get_actual(STICK_2_Y)) < StickNoise) { set_val(STICK_2_Y, 0.0); }
 
    }
    // ANTI-RECOIL
    if (get_val (BUTTON_5) && get_val(BUTTON_8)) //antirecoil only active when firing
    {
        AntiRecoil(STICK_1_Y,RECOIL_V);
        AntiRecoil(STICK_1_X,RECOIL_H);
    }
 
    if(event_active(BUTTON_5) && get_val(BUTTON_2)) {
        rapidfire_toggle = !rapidfire_toggle;
    }
    if(rapidfire_toggle && get_val(BUTTON_5) && get_val(BUTTON_8)) {
        combo_run(Rapidfire);
    }
 
}
 
combo Rapidfire {
    set_val(BUTTON_5, 100.0);
    wait(50);
    set_val(BUTTON_5, 0.0);
    wait(15);
    set_val(BUTTON_5, 0.0);
}
 
void AntiRecoil (uint8 axis, fix32 recoil)
{
 
    RY = get_actual(STICK_1_Y);
    RX = get_actual(STICK_1_X);
 
    if (get_val(BUTTON_5) && (sqrt(RX*RX + RY*RY)) <= abs(recoil))
    {
        if(abs(RY) <= abs(recoil))
        {
            set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_val(axis));
        }
    }
}
 
 
Official Australian retailer for Titan One, Titan Two and XIM APEX at Mod Squad
User avatar
antithesis
Colonel
Colonel
 
Posts: 1912
Joined: Sat May 28, 2016 10:45 pm

Re: Antithesis' ADS Anti-recoil script on a Titan Two/XIM AP

Postby norcal3737 » Mon May 28, 2018 6:50 am

antithesis wrote:
norcal3737 wrote:Possible you could provide me the correct scripting (and on which line to add it) to make your AR & RF combo script to be only active on ADS?


Try this -

Code: Select all
 
#pragma METAINFO("antithesis ADS AR & RF", 1, 02, "antithesis")
 
fix32 RECOIL_V = 35.0;
fix32 RECOIL_H = 0.0;
fix32 RY;
fix32 RX;
 
fix32 StickNoise = 4.32;
 
bool rapidfire_toggle = FALSE;
 
main {
    if (get_val (BUTTON_5)) // only active when firing to allow for microaim adjustments without the input being filtered
    {   
        // DEADZONE REMOVER
        if(abs(get_actual(STICK_1_X)) < StickNoise) { set_val(STICK_1_X, 0.0); }
        if(abs(get_actual(STICK_1_Y)) < StickNoise) { set_val(STICK_1_Y, 0.0); }
        if(abs(get_actual(STICK_2_X)) < StickNoise) { set_val(STICK_2_X, 0.0); }
        if(abs(get_actual(STICK_2_Y)) < StickNoise) { set_val(STICK_2_Y, 0.0); }
 
    }
    // ANTI-RECOIL
    if (get_val (BUTTON_5) && get_val(BUTTON_8)) //antirecoil only active when firing
    {
        AntiRecoil(STICK_1_Y,RECOIL_V);
        AntiRecoil(STICK_1_X,RECOIL_H);
    }
 
    if(event_active(BUTTON_5) && get_val(BUTTON_2)) {
        rapidfire_toggle = !rapidfire_toggle;
    }
    if(rapidfire_toggle && get_val(BUTTON_5) && get_val(BUTTON_8)) {
        combo_run(Rapidfire);
    }
 
}
 
combo Rapidfire {
    set_val(BUTTON_5, 100.0);
    wait(50);
    set_val(BUTTON_5, 0.0);
    wait(15);
    set_val(BUTTON_5, 0.0);
}
 
void AntiRecoil (uint8 axis, fix32 recoil)
{
 
    RY = get_actual(STICK_1_Y);
    RX = get_actual(STICK_1_X);
 
    if (get_val(BUTTON_5) && (sqrt(RX*RX + RY*RY)) <= abs(recoil))
    {
        if(abs(RY) <= abs(recoil))
        {
            set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_val(axis));
        }
    }
}
 
 


It works, and I appreciate you creating that for me, but I guess I mean if it could be active only when I'm ADS AND shooting. Right now, it begins shooting when I ADS, before I get to even click fire. It was a straight copy&paste into GTuner.
User avatar
norcal3737
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Sun Apr 22, 2018 5:21 am

Re: Antithesis' ADS Anti-recoil script on a Titan Two/XIM AP

Postby antithesis » Mon May 28, 2018 7:30 am

I just checked the script and it functions only when ADS is held (BUTTON_5), and SHOOT is pressed (BUTTON_8), and only if the toggle is active. Neither ADS or SHOOT alone will trigger either antirecoil or rapidfire.

That's what this bit does -
Code: Select all
 
if(rapidfire_toggle && get_val(BUTTON_5) && get_val(BUTTON_8))
 


Make sure you copy and paste the correct version.
Official Australian retailer for Titan One, Titan Two and XIM APEX at Mod Squad
User avatar
antithesis
Colonel
Colonel
 
Posts: 1912
Joined: Sat May 28, 2016 10:45 pm


Return to XIM Apex, XIM4, XIM Edge with Titan devices

Who is online

Users browsing this forum: No registered users and 42 guests