How 2 String Combos?

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

How 2 String Combos?

Postby 3rne5t0 » Wed Jan 03, 2018 3:09 pm

how can i hang combos together like; if combo 1 is finish start combo 2 and if 2 is finish start 3 :roll:
User avatar
3rne5t0
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 210
Joined: Mon Jan 30, 2017 10:31 am

Re: How 2 String Combos?

Postby bonefisher » Wed Jan 03, 2018 3:29 pm

At the end of combo use call (combo name);
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: How 2 String Combos?

Postby 3rne5t0 » Wed Jan 03, 2018 7:45 pm

you call it in the if variable or in the end of combo itself. Can you show me a little example?
User avatar
3rne5t0
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 210
Joined: Mon Jan 30, 2017 10:31 am

Re: How 2 String Combos?

Postby bonefisher » Wed Jan 03, 2018 8:36 pm

You need to use it inside the combo at the end but you cannot Loop it it's a single run combo and at the end use call method. I'll give you an example later on tonight when I get home.
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: How 2 String Combos?

Postby bonefisher » Wed Jan 03, 2018 10:12 pm

Code: Select all
 
main {
    // kills button while combo runs.
    set_val(BUTTON_15, 0.0);
    // tap to run all three combo one after the other.
    if(event_active(BUTTON_15) && time_active(BUTTON_15) < 200) {
        combo_run(COMBO_1);
    // while holding button will loop first combo then when released
    // will finish out the other combos.
    }else if(get_actual(BUTTON_15) && time_active(BUTTON_15) > 200) {
        combo_run(COMBO_1);combo_pause(COMBO_2);
    }
    // if double tapped or hold then tapped quick will stop combos.
    if(event_active(BUTTON_15) && time_release(BUTTON_15) < 140) {
        combo_stop(COMBO_1);combo_stop(COMBO_2);combo_stop(COMBO_3);
    }
 
}
combo COMBO_1
{
    set_val(BUTTON_10, 100.0);
    wait(200);
    set_val(BUTTON_11, 100.0);
    wait(200);
    set_val(BUTTON_12, 100.0);
    wait(200);
    set_val(BUTTON_13, 100.0);
    wait(200);
    call(COMBO_2);
}
combo COMBO_2
{
    set_val(BUTTON_14, 100.0);
    wait(200);
    set_val(BUTTON_15, 100.0);
    wait(200);
    set_val(BUTTON_16, 100.0);
    wait(200);
    set_val(BUTTON_17, 100.0);
    wait(200);
    call(COMBO_3);
}
combo COMBO_3
{
    set_val(BUTTON_4, 100.0);
    wait(200);
    set_val(BUTTON_5, 100.0);
    wait(200);
    set_val(BUTTON_6, 100.0);
    wait(200);
    set_val(BUTTON_7, 100.0);
    wait(200);
}
 

:smile0517:
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: How 2 String Combos?

Postby 3rne5t0 » Thu Jan 04, 2018 6:37 pm

:smile0208: :smile0517: :smile0517: :smile0517: :smile0517: :smile0517:
User avatar
3rne5t0
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 210
Joined: Mon Jan 30, 2017 10:31 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 136 guests