Can anyone add a feature to this script

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

Can anyone add a feature to this script

Postby Beryl » Tue Sep 28, 2021 2:52 pm

Can anyone add a soft aim lean to this so when i press LB Im able to use the left analog stick to lean left and right?
Code: Select all
main {
 
    if(get_val(BUTTON_8)) {
        if(get_val(BUTTON_8) >= 100.00) {
            set_val(BUTTON_7, 100.0);
        }
        if(get_actual(STICK_2_X) > 50.0) {
            set_val(BUTTON_6, 100.0);   // LEAN LEFT
        }
        if(get_actual(STICK_2_X) < -50.0) {
            set_val(BUTTON_9, 100.0);   // LEAN RIGHT
        }
        set_val(BUTTON_8, 100.0);
    }
}
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Can anyone add a feature to this script

Postby Beryl » Sat Oct 02, 2021 10:40 pm

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

Re: Can anyone add a feature to this script

Postby Haures » Sat Oct 02, 2021 11:52 pm

for what game? and what exactly is it you trying to achiev, something like if you hold lb and use the left stick to lean left and right or do you want lb to toggle the option to use the left stick to lean?
Haures
Sergeant First Class
Sergeant First Class
 
Posts: 16
Joined: Thu Sep 16, 2021 2:59 pm
Location: Germany

Re: Can anyone add a feature to this script

Postby Beryl » Sun Oct 03, 2021 6:58 am

PUBG, the script currently gives me the ability so lean left and right with the left analog stick whilst im ads'n which is really good all im after is the ability to do the same whilst in soft aim which is LB on console. Just makes it an easier process instead of adding lean buttons to paddles
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Can anyone add a feature to this script

Postby Beryl » Sun Oct 03, 2021 9:19 pm

Bump, can someone at least tell me what button number LB is?
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Can anyone add a feature to this script

Postby Mad » Sun Oct 03, 2021 9:25 pm

Beryl wrote:Bump, can someone at least tell me what button number LB is?

Press F1 in Gtuner
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am

Re: Can anyone add a feature to this script

Postby Beryl » Sun Oct 03, 2021 9:54 pm

I did and it says button 7 but it aint working when i change button 8 to 7 and iv no idea what im doing thats wrong? All i want is the ability to soft aim and lean left and right with the left analog the same way im able to when im adsn. Im open to learning but im going round in circles and all i cant is if im usong the wrong button no?
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Can anyone add a feature to this script

Postby Haures » Sat Oct 09, 2021 11:20 pm

Beryl wrote:I did and it says button 7 but it aint working when i change button 8 to 7 and iv no idea what im doing thats wrong? All i want is the ability to soft aim and lean left and right with the left analog the same way im able to when im adsn. Im open to learning but im going round in circles and all i cant is if im usong the wrong button no?


Hi here is something that should work.

Code: Select all
 
main {
    // FULL ADS / LT
    if(get_val(BUTTON_8) >=100.00) {        // BUTTON_8 = LT
 
        if(get_actual(STICK_2_X) > 50.0) {    // LS +50 = to the right
            set_val(BUTTON_6, 100.0);       // LEAN RIGHT    // BUTTON_6=LS
        }
        if(get_actual(STICK_2_X) < -50.0) {    // LS -50 = to the left
            set_val(BUTTON_9, 100.0);       // LEAN LEFT    // BUTTON_9=RS
        }
        set_val(BUTTON_8, 100.0);            // BUTTON_8 = LT
    }
    ////////////////////////////////
    // SOFT AIM / LB
    if(get_val(BUTTON_7) >=100.00) {        // BUTTON_7 = LB
 
        if(get_actual(STICK_2_X) > 50.0) {    // LS +50 = to the right
            set_val(BUTTON_6, 100.0);       // LEAN RIGHT    // BUTTON_6=LS
        }
        if(get_actual(STICK_2_X) < -50.0) {    // LS -50 = to the left
            set_val(BUTTON_9, 100.0);       // LEAN LEFT    // BUTTON_9=RS
        }
        set_val(BUTTON_7, 100.0);            // BUTTON_7 = LB
    }   
}
Haures
Sergeant First Class
Sergeant First Class
 
Posts: 16
Joined: Thu Sep 16, 2021 2:59 pm
Location: Germany


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 87 guests