Auto strafing

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

Auto strafing

Postby SilentStealthx1988 » Fri May 27, 2022 11:47 pm

discord: Chanelly1988#5908

hello community!

so i have asked for help in the consoletuner discord, but the moderators seem to just talk around it. i need a small line of code in order to pull this off:
if input is detected on L3 (moving around the stick whilst shooting) then combo strafer will stop.
if no input is detected on L3 combo strafer will run.

**do note that the combo strafer stops whilst still holding R1 or repressing it if L3 is being moved. so stopping has priority**

also there should be a variable where i can put in the resting values of my controller or the combo will never run due to input detection.
Code: Select all
#include <titanone.gph>
main {
 
            if(get_val(BUTTON_4)) // R1
            {
                combo_run(strafer);
            }
}
 
combo strafer {
    set_val(11, 100);
    wait(240);
    set_val(11, -100);
    wait(240);
}
User avatar
SilentStealthx1988
Private First Class
Private First Class
 
Posts: 3
Joined: Fri May 27, 2022 11:07 pm

Re: Auto strafing

Postby Mad » Sat May 28, 2022 12:46 am

SilentStealthx1988 wrote:so i have asked for help in the consoletuner discord, but the moderators seem to just talk around it.

You tagged me and an hour later make this post. You'll get no help from me acting like that.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am

Re: Auto strafing

Postby SilentStealthx1988 » Sat May 28, 2022 12:53 am

i had no idea you would reply! my apologies. can we still come to a solution? im just not so familiar with discord
User avatar
SilentStealthx1988
Private First Class
Private First Class
 
Posts: 3
Joined: Fri May 27, 2022 11:07 pm

Re: Auto strafing

Postby Mad » Sat May 28, 2022 1:25 am

Code: Select all
main {
    if(is_active(BUTTON_4) && is_release(STICK_2_X) * is_release(STICK_2_Y)) {
        combo_run(strafer);
    }
    else combo_stop(strafer);
}
combo strafer {
    set_val(STICK_2_X, 100);
    wait(240);
    set_val(STICK_2_X, -100);
    wait(240);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am

Re: Auto strafing

Postby SilentStealthx1988 » Sat May 28, 2022 10:20 pm

wow looks amazing! i test it out tomorrow big thanks. sorry for the no patience my apologies
User avatar
SilentStealthx1988
Private First Class
Private First Class
 
Posts: 3
Joined: Fri May 27, 2022 11:07 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 76 guests