anyway to combine these?

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

anyway to combine these?

Postby gohun9008 » Sat Mar 03, 2018 8:38 pm

Code: Select all
int i;
main {
          if(get_val(XB1_B))
          {
          i = 1;
          }
          if(get_val(XB1_LS))
          {       
                combo_stop(Auto_Build)
                        i = 0;
          }
          if(i>=1)
          {
                 combo_run(Auto_Build);
          }     
          if(i==0)
          {
                 combo_stop(Auto_Build);
          }       
 }
 
 combo Auto_Build
 {
    set_val(XB1_RT, 55);
    wait(150);// I ment this number but if you didnt down load the last version change this number to delay RT presses but im pretty sure this is good for anyone
    set_val(XB1_RT, 0);
    wait(150);
    set_val(XB1_RT, 0);
}



Code: Select all
main {
    // EASY SPRINT
    if(get_val(PS4_LY) <= -75.0) {
        combo_run(EasySprint);
    } else {
        combo_stop(EasySprint);
    }
 
    // RAPIDFIRE
    if(get_val(PS4_R2)) {
        set_val(PS4_R2, 0.0);
        combo_run(Rapidfire);
        combo_stop(EasySprint);
    }
}
 combo Rapidfire {
    set_val(PS4_L2, 100.0);
    wait(40);
    set_val(PS4_L2, 100.0);
    set_val(PS4_R2, 100.0);
    wait(40);
    set_val(PS4_L2, 0.0);
    set_val(PS4_R2, 0.0);
    wait(40);
}
combo EasySprint {
    set_val(PS4_L3, 100.0);
}





but remove the autosprint from the script and combine them?
User avatar
gohun9008
First Sergeant
First Sergeant
 
Posts: 63
Joined: Sun Sep 13, 2015 2:37 pm

Re: anyway to combine these?

Postby J2Kbr » Mon Mar 05, 2018 12:17 pm

Combined and auto-sprint removed. :smile0517:
Code: Select all
int i;
 
main {
    if(get_val(XB1_B)) {
        i = 1;
    }
    if(get_val(XB1_LS)) {       
        combo_stop(Auto_Build)
        i = 0;
    }
    if(i >= 1) {
        combo_run(Auto_Build);
    }     
    if(i == 0) {
        combo_stop(Auto_Build);
    }     
    // RAPIDFIRE
    if(get_val(PS4_R2)) {
        set_val(PS4_R2, 0.0);
        combo_run(Rapidfire);
    }
}
 
combo Rapidfire {
    set_val(PS4_L2, 100.0);
    wait(40);
    set_val(PS4_L2, 100.0);
    set_val(PS4_R2, 100.0);
    wait(40);
    set_val(PS4_L2, 0.0);
    set_val(PS4_R2, 0.0);
    wait(40);
}
 
combo Auto_Build {
    set_val(XB1_RT, 55);
    wait(150);// I ment this number but if you didnt down load the last version change this number to delay RT presses but im pretty sure this is good for anyone
    set_val(XB1_RT, 0);
    wait(150);
    set_val(XB1_RT, 0);
}
 
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 62 guests

cron