Script Help

GPC1 script programming for Titan One. Code examples, questions, requests.

Script Help

Postby msdaniel924 » Mon Jun 18, 2018 7:30 am

So my friend Dylan and I always share the controller to play BO2 (splitscreen sucks and no dual play tv), but we both have different settings. (I play tactical with 8 sens and he plays default with 4 sens) and have made an unfinished script that with a button combo automatically changes the settings for us instead of doing it manually.
Code: Select all
main {
        // If UP + DOWN has been pressed ...
        if(get_val(XB360_UP)   && get_val(XB360_DOWN)) combo_run(Ty);
        if(get_val(XB360_LEFT) && get_val(XB360_RIGHT)) combo_run(Dylan);
        if(get_val(XB360_UP)   && get_val(XB360_DOWN)) combo_run(RumbleNotifier);
        if(get_val(XB360_LEFT) && get_val(XB360_RIGHT)) combo_run(RumbleNotifier);
 
    }
 
// If RB + LB is pressed, Ty will run //
 
combo
Dylan{
    set_val(XB360_START, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_A, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_A, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
    wait(130);
    set_val(XB360_B, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
}
combo RumbleNotifier {
    set_rumble(RUMBLE_A, 100);
    wait(200);
    reset_rumble();
}
combo
Ty{
    set_val(XB360_START, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_A, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_A, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
    wait(130);
    set_val(XB360_B, 100);
    wait(130);
    set_val(XB360_DOWN, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
    wait(130);
    set_val(XB360_RIGHT, 100);
User avatar
msdaniel924
Private
Private
 
Posts: 1
Joined: Sat Jun 16, 2018 1:42 pm

Re: Script Help

Postby J2Kbr » Tue Jun 19, 2018 2:51 pm

Nice script!! :) Thank you for sharing with us!!
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 70 guests