Script request - For Halo and COD

GPC2 script programming for Titan Two. Code examples, questions, requests.

Script request - For Halo and COD

Postby ixlz » Sun Sep 26, 2021 4:27 pm

I requested the below code back in 2018, to be used mainly for Black Ops 4 at the time. But, now that the newer games of Halo Infinite and Vanguard are approaching, I would like them updated. Big ups to @Buffy and @J2Kbr for the original scripts!

May I have someone update the script to include features now present in the newer COD and Halo games? I know when I used the script in Modern Warefare 2019 and Cold War, the sprint didn't work as it should be compared to Black Ops 4. And the aim assist seemed not to as well. Any other feature can be thrown in as well for the respected games.

I am much appreciated for sure! Please let me know if you may require any more information.

Thank you :smile0517:

Link to the original script
https://www.consoletuner.com/forum/viewtopic.php?f=26&t=10588

Code: Select all
#define RAPIDFIRE_BUTTON    BUTTON_5
#define ADS_BUTTON          BUTTON_8
#define SPRINT_BUTTON       BUTTON_9
 
#define RATE_OF_FIRE        15  // Range: 1 to 25 RPS (Round/s)
                                // Values higher than 25 would be so fast that the
                                // game probably will not detect 100% of the events.
 
// The force needed may be different when ADS or hip firing
#define ANTIRECOIL_FORCE    11.0
 
int hold_time, rest_time;
 
init {
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 1;
    if(rest_time < 0) rest_time = 0;
    // Legacy stick layout
    remapper_swap(STICK_1_X, STICK_2_X);
}
 
main {
    // Rapidfire
    if(get_val(RAPIDFIRE_BUTTON)) {
        set_val(RAPIDFIRE_BUTTON, 100.0);
        combo_run(RapidFire);
        combo_run(AntiRecoil);
    } else if(RapidFire) {
        combo_stop(RapidFire);
    }
 
    if(get_val(ADS_BUTTON)) {
        set_val(ADS_BUTTON, 100.0);
    }
 
    // Easy Sprint
    if(get_val(STICK_2_Y) <= -75.0) {
        combo_run(EasySprint);
    }
}
 
combo RapidFire {
    set_val(RAPIDFIRE_BUTTON, 100.0);
    wait(hold_time);
    set_val(RAPIDFIRE_BUTTON, 0.0);
    wait(rest_time);
    set_val(RAPIDFIRE_BUTTON, 0.0);
}
 
combo EasySprint {
    set_val(SPRINT_BUTTON, 100.0);
    wait(50); wait(100);
}
 
combo AntiRecoil { // This combo must be the last one
    set_val(STICK_1_Y, clamp(get_val(STICK_1_Y) + ANTIRECOIL_FORCE, -100.0, 100.0));
}
 
User avatar
ixlz
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Sun Dec 14, 2014 3:29 pm

Re: Script request - For Halo and COD

Postby Mad » Thu Sep 30, 2021 7:55 am

Most scripts in the online resource have these features already so better of using them.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Script request - For Halo and COD

Postby ixlz » Sat Oct 02, 2021 1:48 am

The main element that I use is the legacy stick option. I haven't searched or tried a lot of the other scripts available. The ones that I did use, however, did not have legacy sticks. Some other FPS games besides Halo's and COD's, only have the default stick option. For those games, I would just use the above script.

I just wanted a couple of new elements added, as this script is older. And the easy sprint does work in Cold War, so I'm good. I'll take another look at the other scripts in the software and try them out. :smile0517:
User avatar
ixlz
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Sun Dec 14, 2014 3:29 pm

Re: Script request - For Halo and COD

Postby Mad » Sat Oct 02, 2021 2:14 am

You can remap via an input translator to your liking.

File>New>New Input Translator

Top right of metainfo you can select your console (to make button names easier to understand)

Then remap them under controller remapper.

Once done File>Save
File>Install To>Memory Slot #
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Script request - For Halo and COD

Postby Haures » Sat Oct 02, 2021 8:48 am

Haures
Sergeant First Class
Sergeant First Class
 
Posts: 16
Joined: Thu Sep 16, 2021 2:59 pm
Location: Germany

Re: Script request - For Halo and COD

Postby ixlz » Sun Oct 03, 2021 1:28 am

Nice, I didn't know about a lot of this stuff! Thanks for the information :smile0702:
User avatar
ixlz
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Sun Dec 14, 2014 3:29 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: A pile of bricks and 186 guests