Auto Strafe Request

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

Auto Strafe Request

Postby Beryl » Sat Jan 29, 2022 3:43 pm

Has anyone got a strafe script that when i press LB and RT together on xbox i auto strafe until released?
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Auto Strafe Request

Postby Mad » Sat Jan 29, 2022 9:35 pm

Code: Select all
#include <xb1.gph>
#define STRAFE_TIME 500
 
main {
    if(is_release(XB1_LX) * is_release(XB1_LY)) {
        if(is_active(XB1_LB) && is_active(XB1_RT)) combo_run(Strafe);
        else if(Strafe) combo_stop(Strafe);
    }
}
 
combo Strafe {
    set_val(XB1_LX, -100);
    wait(STRAFE_TIME);
    set_val(XB1_LX, 100);
    wait(STRAFE_TIME);
}
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 Strafe Request

Postby Beryl » Sat Jan 29, 2022 10:17 pm

Thankyou!
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Auto Strafe Request

Postby Beryl » Sat Jan 29, 2022 10:49 pm

Thats brilliant btw jus tried it! Btw if i wanted to move faster how would i alter it?
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Auto Strafe Request

Postby Mad » Sun Jan 30, 2022 12:00 am

Beryl wrote:Thats brilliant btw jus tried it! Btw if i wanted to move faster how would i alter it?

Second line.
Code: Select all
#define STRAFE_TIME 500
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 Strafe Request

Postby Beryl » Tue Feb 01, 2022 3:05 pm

Thankyou, so if i increase does that make me move faster or slower?
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Auto Strafe Request

Postby Mad » Tue Feb 01, 2022 10:35 pm

Beryl wrote:Thankyou, so if i increase does that make me move faster or slower?

Slower.
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 Strafe Request

Postby Beryl » Wed Feb 02, 2022 1:36 am

Cool thank you will play around with it tommorow. Thanks again for your help.
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Auto Strafe Request

Postby Beryl » Thu Feb 17, 2022 3:35 pm

Mad wrote:
Code: Select all
#include <xb1.gph>
#define STRAFE_TIME 500
 
main {
    if(is_release(XB1_LX) * is_release(XB1_LY)) {
        if(is_active(XB1_LB) && is_active(XB1_RT)) combo_run(Strafe);
        else if(Strafe) combo_stop(Strafe);
    }
}
 
combo Strafe {
    set_val(XB1_LX, -100);
    wait(STRAFE_TIME);
    set_val(XB1_LX, 100);
    wait(STRAFE_TIME);
}


1st off this works fantastic thankyou, 2nd could you alter it so i could have the strafe to start when i hold the (LT) and the (RT) so im able to ads then on fire start straffing? but if possible could you add a delay? So im able to still fire off a snipe from a window without moving straight away?

Hope this makes sense
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Auto Strafe Request

Postby Mad » Thu Feb 17, 2022 9:24 pm

Change line 6 to:
Code: Select all
if(is_active(XB1_LT) && check_active(XB1_RT, 500)) combo_run(Strafe);
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am

Next

Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 126 guests