Coding help with creating combos

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

Coding help with creating combos

Postby RandomCitizen » Fri Oct 04, 2019 5:24 am

I am trying to learn some coding to create combos for fighting games for PS4 (Injustice 2 first and then one day I might try MK11)

I have written a basic code to just do a 3x hit combo using whats in the documentation.

I would like to make a string of combos for max damage.

When I look at other peoples code in the community they are way more advanced than what I can handle for now.

I want to be able to add in directional moves as well as pressing 2 buttons at the same time.

Can anyone please give me some basic examples that I can learn from and play around with?

So an example would be:

DPAD Down + Square, Triangle, DPAD Right + Triangle, Cross etc

Below is what I am able to do right now and I want to grow from there

Thanks in advance

Code: Select all
init {
 
}
 
main {
    if (event_active(BUTTON_5)) combo_run(SomeName);
}
 
 combo SomeName {
    set_val(BUTTON_17, 100); // set BUTTON_Square to pressed
    wait(100);               // press for 100ms
 
    set_val(BUTTON_17, 0);   // set BUTTON_Square to released
    wait(100);               // release for 100ms
 
         set_val(BUTTON_17, 100); // set BUTTON_Square to pressed
    wait(100);               // press for 100ms
 
    set_val(BUTTON_17, 0);   // set BUTTON_Square to released
    wait(100);               // release for 100ms
 
    set_val(BUTTON_16, 100); // set BUTTON_Cross to pressed
    wait(100);               // press for 100ms
 
    set_val(BUTTON_16, 0);   // set BUTTON_Cross to released
    wait(100);               // release for 100ms
}
User avatar
RandomCitizen
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Tue Nov 13, 2018 11:40 am

Re: Coding help with creating combos

Postby Scachi » Fri Oct 04, 2019 6:21 am

To press/release/set multiple buttons at once put them in the same wait(time) section like this:
Code: Select all
 
// DPAD Down + Square
combo SomeName {
    set_val(BUTTON_11,100);   
    set_val(BUTTON_17, 100); // set buttons to pressed
    wait(100);               // press for 100ms
    set_val(BUTTON_11, 0);   
    set_val(BUTTON_17, 0);   // set buttons to released
    wait(100);               // release for 100ms
}
 
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Coding help with creating combos

Postby Mad » Fri Oct 04, 2019 6:22 am

The easiest way to do this for fighting games is record macros that you can later convert to a combo.

https://www.consoletuner.com/wiki/index ... ing:macros
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: Coding help with creating combos

Postby RandomCitizen » Fri Oct 04, 2019 6:55 am

Is this the same thing?

Code: Select all
 combo SomeName {
    set_val(BUTTON_11, 100.0);     // Down
    set_val(BUTTON_17, 100.0);     // Square
    wait(50);   


does the "100.0" mean press and release?
User avatar
RandomCitizen
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Tue Nov 13, 2018 11:40 am

Re: Coding help with creating combos

Postby RandomCitizen » Fri Oct 04, 2019 6:57 am

Mad wrote:The easiest way to do this for fighting games is record macros that you can later convert to a combo.

https://www.consoletuner.com/wiki/index ... ing:macros


I tried the macro thing but its really confusing actually for me at this stage.

The code looked very long for just 3 hit combos when i tried it and I don't know how to clean it up or add the combos together

So for now I will just try manual until i feel more comfortable
User avatar
RandomCitizen
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Tue Nov 13, 2018 11:40 am

Re: Coding help with creating combos

Postby Scachi » Fri Oct 04, 2019 7:15 am

RandomCitizen wrote:Is this the same thing?

Code: Select all
 combo SomeName {
    set_val(BUTTON_11, 100.0);     // Down
    set_val(BUTTON_17, 100.0);     // Square
    wait(50);   


does the "100.0" mean press and release?

set_val is a single command, it can't/doesn't set the button as pressed and released at the same time
100 is fully pressed. 0 is released. You have to call it twice. To set & unset the button. It is possible to skip the set_val(input,0); as long as you are sure that you don't have the button pressed manually at that time. But you still need the wait(time); for the release.
Code: Select all
 combo SomeName {
    set_val(BUTTON_11, 100.0);     // Down
    set_val(BUTTON_17, 100.0);     // Square
    wait(50);     // set
   // no set_val defined (released when not manually pressed)
    wait(50);    // empty section
 

Take a look at the "Device Monitor" when you actually hit the button yourself.
For normal buttons you will see a value of 100 for pressed or a value 0 for released.
The triggers can have values between 0 up to 100 and the sticks -100 up to 100 for each axis.

Take a close look at "Press and Release of a button" -> https://www.consoletuner.com/wiki/index ... s#pitfalls
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Coding help with creating combos

Postby bonefisher » Fri Oct 04, 2019 10:01 am

Code: Select all
 
#pragma METAINFO("FightGames", 1, 0, "bonefisher")
#include <display.gph>
int Forward;
int Back;
int BUTTON;
uint32    IND[] = {
    _B_,            // 0
    _S_,            // 1
    _H_,            // 2
    _3_             // 3
};
init {
    Forward = BUTTON_13;
    Back = BUTTON_12;
}
main
{
    // - STANCE TRACKING - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define STANCE_RIGHT     0
    #define STANCE_LEFT      1
    static uint8 stance;
    if(event_active(BUTTON_13) || event_active(STICK_2_X) && get_actual(STICK_2_X) >= 20.0) {
        stance = STANCE_RIGHT;
        goto STANCE_LIGHTBAR;
    } else if(event_active(BUTTON_12)  || event_active(STICK_2_X) && get_actual(STICK_2_X) <= -20.0) {
        stance = STANCE_LEFT;
        goto STANCE_LIGHTBAR;
    if(stance || !stance) {
        switch(stance) {
            case STANCE_RIGHT: stance = STANCE_LEFT;  break;
            case STANCE_LEFT:  stance = STANCE_RIGHT; break;
        }
    }
        STANCE_LIGHTBAR:
        led_reset();
        switch(stance) {
            case STANCE_RIGHT: Forward = BUTTON_13; Back = BUTTON_12;led_set(LED_4, -1.0, 0);led_set(LED_3, -1.0, 0); break;
            case STANCE_LEFT:  Forward = BUTTON_12; Back = BUTTON_13;led_set(LED_4, -1.0, 0); break;
        }
    }
    // - MOVES TRACKING - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define MOVES_0     0
    #define MOVES_1     1
    #define MOVES_2     2
    static uint8 moves;
    if(get_actual(BUTTON_8)){
        set_val(BUTTON_2, 0.0);
    if(event_active(BUTTON_2)) {
    if(moves == MOVES_0){
        moves = MOVES_1;
        goto MOVES_LIGHTBAR;
    } else if(moves == MOVES_1) {
        moves = MOVES_2;
        goto MOVES_LIGHTBAR;
    } else if(moves == MOVES_2) {
        moves = MOVES_0;
        goto MOVES_LIGHTBAR;
    }
    if(moves || !moves) {
        switch(moves) {
            case MOVES_0: moves = MOVES_1; break;
            case MOVES_1: moves = MOVES_2; break;
            case MOVES_2: moves = MOVES_0; break;
        }
    }
        MOVES_LIGHTBAR:
        led_reset();
        switch(moves) {
            case MOVES_0: display (0); break;
            case MOVES_1: display (1); break;
            case MOVES_2: display (2); break;
        }
    }
    }
    // - BUTTON TRACKING - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define BUTTON_X     BUTTON_17
    #define BUTTON_Y     BUTTON_14
    #define BUTTON_A     BUTTON_16
    #define BUTTON_B     BUTTON_15
    static uint8 button_cycle;
    if(event_active(BUTTON_17)) {
        button_cycle = BUTTON_X;
        BUTTON = BUTTON_X;
        goto BUTTON_LIGHTBAR;
    } else if(event_active(BUTTON_14)) {
        button_cycle = BUTTON_Y;
        BUTTON = BUTTON_Y;
        goto BUTTON_LIGHTBAR;
    } else if(event_active(BUTTON_16)) {
        button_cycle = BUTTON_A;
        BUTTON = BUTTON_A;
        goto BUTTON_LIGHTBAR;
    } else if(event_active(BUTTON_15)) {
        button_cycle = BUTTON_B;
        BUTTON = BUTTON_B;
        goto BUTTON_LIGHTBAR;
    if(button_cycle || !button_cycle) {
        switch(button_cycle) {
            case BUTTON_X: button_cycle = BUTTON_Y; break;
            case BUTTON_Y: button_cycle = BUTTON_A; break;
            case BUTTON_A: button_cycle = BUTTON_B; break;
            case BUTTON_B: button_cycle = BUTTON_X; break;
        }
    }
        BUTTON_LIGHTBAR:
        led_reset();
        switch(button_cycle) {
            case BUTTON_X: led_set(LED_1, -1.0, 0); break;
            case BUTTON_Y: led_set(LED_2, -1.0, 0);led_set(LED_3, -1.0, 0); break;
            case BUTTON_A: led_set(LED_3, -1.0, 0); break;
            case BUTTON_B: led_set(LED_2, -1.0, 0); break;
        }
    }
    if(moves == MOVES_0)
    {
    if(get_actual(STICK_1_Y) < -60.0)
    {
        combo_run(F22_BF3_F22_BF1);
    }
    else combo_stop(F22_BF3_F22_BF1);
 
    if(get_actual(STICK_1_Y) > 60.0)
    {
        combo_run(B12_BF3_111_BF3);
    }
    else combo_stop(B12_BF3_111_BF3);
 
    if(get_actual(STICK_1_X) < -60.0)
    {
        combo_run(DBA);
    }
    else combo_stop(DBA);
 
    if(get_actual(STICK_1_X) > 60.0)
    {
        combo_run(B12_BF3_23_23_23_DB2AMP);
    }
    else combo_stop(B12_BF3_23_23_23_DB2AMP);
    }
    if(moves == MOVES_1)
    {
    if(get_actual(STICK_1_Y) < -60.0)
    {
        combo_run(B141);
    }
    else combo_stop(B141);
 
    if(get_actual(STICK_1_Y) > 60.0)
    {
        combo_run(BF1_RB_B4);
    }
    else combo_stop(BF1_RB_B4);
 
    if(get_actual(STICK_1_X) < -60.0)
    {
        combo_run(DB3_RB);
    }
    else combo_stop(DB3_RB);
 
    if(get_actual(STICK_1_X) > 60.0)
    {
        combo_run(BF1_RB_B141);
    }
    else combo_stop(BF1_RB_B141);   
    }
    if(moves == MOVES_2)
    {
    if(get_actual(STICK_1_Y) < -60.0)
    {
        combo_run(DB3_RB_4);
    }
    else combo_stop(DB3_RB_4);
 
    if(get_actual(STICK_1_Y) > 60.0)
    {
        combo_run(DB3_RB_B34);
    }
    else combo_stop(DB3_RB_B34);
 
    if(get_actual(STICK_1_X) < -60.0)
    {
 
    }
 
 
    if(get_actual(STICK_1_X) > 60.0)
    {
 
    }   
    }
    if(get_actual(BUTTON))combo_run(rapid);
}
combo rapid
{
    set_val(BUTTON, 100);
    wait(50);
    set_val(BUTTON, 0);
    wait(50);
}
 
combo F22_BF3_F22_BF1
{
    set_val(Forward, 100.0);
    set_val(BUTTON_14, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_14, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(1300);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    set_val(BUTTON_14, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_14, 100.0);
    wait(50);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(15);
    wait(5000);
 
}
 combo B12_BF3_111_BF3
{
    set_val(Back, 100.0);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(300);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(1200);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(700);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.00);
    wait(50);
    wait(5000);
}
 
combo B12_BF3_23_23_23_DB2AMP
{
    set_val(Back, 100.0);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(300);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(1200);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(600);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(600);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(600);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(400);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(5000);
}
 
combo DBA
{
    set_val(BUTTON_11, 100.0);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    set_val(BUTTON_16, 100.00);
    wait(50);
    wait(5000);
}
 
combo B141
{
    set_val(Back, 100.0);
    set_val(BUTTON_17, 100.0);
    wait(50);
    set_val(BUTTON_15, 100.00);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(5000);
}
 
combo BF1_RB_B4
{
    set_val(Back, 100.0);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(600);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(1000);
    set_val(Back, 100.0);
    set_val(BUTTON_15, 100.0);
    wait(50);
    wait(5000);
}
 
combo DB3_RB
{
    set_val(BUTTON_11, 100.0);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(400);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(5000);
}
 
combo BF1_RB_B141
{
    set_val(Back, 100.0);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(600);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(1000);
    set_val(Back, 100.0);
    set_val(BUTTON_17, 100.0);
    wait(50);
    set_val(BUTTON_15, 100.0);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(5000);
}
 
combo DB3_RB_4
{
    set_val(BUTTON_11, 100.0);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(400);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(800);
    set_val(BUTTON_15, 100.00);
    wait(50);
    wait(5000);
}
 
combo DB3_RB_B34
{
    set_val(BUTTON_11, 100.0);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(400);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(800);
    set_val(Back, 100.0);
    set_val(BUTTON_16, 100.0);
    wait(50);
    set_val(BUTTON_15, 100.0);
    wait(50);
    wait(5000);
}
 
// Display Numbers
void display (uint8 indc)
{
    uint8 VIE;
    VIE = IND[indc];
    display_overlay(VIE, 2000 );
}
 

Trade out the combos once you get them and use this to track what side you on. Also can use rapid hit function!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Coding help with creating combos

Postby RandomCitizen » Fri Oct 04, 2019 11:37 am

Scachi wrote:
RandomCitizen wrote:Is this the same thing?

Code: Select all
 combo SomeName {
    set_val(BUTTON_11, 100.0);     // Down
    set_val(BUTTON_17, 100.0);     // Square
    wait(50);   


does the "100.0" mean press and release?

set_val is a single command, it can't/doesn't set the button as pressed and released at the same time
100 is fully pressed. 0 is released. You have to call it twice. To set & unset the button. It is possible to skip the set_val(input,0); as long as you are sure that you don't have the button pressed manually at that time. But you still need the wait(time); for the release.
Code: Select all
 combo SomeName {
    set_val(BUTTON_11, 100.0);     // Down
    set_val(BUTTON_17, 100.0);     // Square
    wait(50);     // set
   // no set_val defined (released when not manually pressed)
    wait(50);    // empty section
 

Take a look at the "Device Monitor" when you actually hit the button yourself.
For normal buttons you will see a value of 100 for pressed or a value 0 for released.
The triggers can have values between 0 up to 100 and the sticks -100 up to 100 for each axis.

Take a close look at "Press and Release of a button" -> https://www.consoletuner.com/wiki/index ... s#pitfalls


Thanks for the clarification, ill work on it some more when I get home after work
User avatar
RandomCitizen
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Tue Nov 13, 2018 11:40 am

Re: Coding help with creating combos

Postby RandomCitizen » Fri Oct 04, 2019 11:39 am

bonefisher wrote:
Code: Select all
 
#pragma METAINFO("FightGames", 1, 0, "bonefisher")
#include <display.gph>
int Forward;
int Back;
int BUTTON;
uint32    IND[] = {
    _B_,            // 0
    _S_,            // 1
    _H_,            // 2
    _3_             // 3
};
init {
    Forward = BUTTON_13;
    Back = BUTTON_12;
}
main
{
    // - STANCE TRACKING - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define STANCE_RIGHT     0
    #define STANCE_LEFT      1
    static uint8 stance;
    if(event_active(BUTTON_13) || event_active(STICK_2_X) && get_actual(STICK_2_X) >= 20.0) {
        stance = STANCE_RIGHT;
        goto STANCE_LIGHTBAR;
    } else if(event_active(BUTTON_12)  || event_active(STICK_2_X) && get_actual(STICK_2_X) <= -20.0) {
        stance = STANCE_LEFT;
        goto STANCE_LIGHTBAR;
    if(stance || !stance) {
        switch(stance) {
            case STANCE_RIGHT: stance = STANCE_LEFT;  break;
            case STANCE_LEFT:  stance = STANCE_RIGHT; break;
        }
    }
        STANCE_LIGHTBAR:
        led_reset();
        switch(stance) {
            case STANCE_RIGHT: Forward = BUTTON_13; Back = BUTTON_12;led_set(LED_4, -1.0, 0);led_set(LED_3, -1.0, 0); break;
            case STANCE_LEFT:  Forward = BUTTON_12; Back = BUTTON_13;led_set(LED_4, -1.0, 0); break;
        }
    }
    // - MOVES TRACKING - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define MOVES_0     0
    #define MOVES_1     1
    #define MOVES_2     2
    static uint8 moves;
    if(get_actual(BUTTON_8)){
        set_val(BUTTON_2, 0.0);
    if(event_active(BUTTON_2)) {
    if(moves == MOVES_0){
        moves = MOVES_1;
        goto MOVES_LIGHTBAR;
    } else if(moves == MOVES_1) {
        moves = MOVES_2;
        goto MOVES_LIGHTBAR;
    } else if(moves == MOVES_2) {
        moves = MOVES_0;
        goto MOVES_LIGHTBAR;
    }
    if(moves || !moves) {
        switch(moves) {
            case MOVES_0: moves = MOVES_1; break;
            case MOVES_1: moves = MOVES_2; break;
            case MOVES_2: moves = MOVES_0; break;
        }
    }
        MOVES_LIGHTBAR:
        led_reset();
        switch(moves) {
            case MOVES_0: display (0); break;
            case MOVES_1: display (1); break;
            case MOVES_2: display (2); break;
        }
    }
    }
    // - BUTTON TRACKING - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define BUTTON_X     BUTTON_17
    #define BUTTON_Y     BUTTON_14
    #define BUTTON_A     BUTTON_16
    #define BUTTON_B     BUTTON_15
    static uint8 button_cycle;
    if(event_active(BUTTON_17)) {
        button_cycle = BUTTON_X;
        BUTTON = BUTTON_X;
        goto BUTTON_LIGHTBAR;
    } else if(event_active(BUTTON_14)) {
        button_cycle = BUTTON_Y;
        BUTTON = BUTTON_Y;
        goto BUTTON_LIGHTBAR;
    } else if(event_active(BUTTON_16)) {
        button_cycle = BUTTON_A;
        BUTTON = BUTTON_A;
        goto BUTTON_LIGHTBAR;
    } else if(event_active(BUTTON_15)) {
        button_cycle = BUTTON_B;
        BUTTON = BUTTON_B;
        goto BUTTON_LIGHTBAR;
    if(button_cycle || !button_cycle) {
        switch(button_cycle) {
            case BUTTON_X: button_cycle = BUTTON_Y; break;
            case BUTTON_Y: button_cycle = BUTTON_A; break;
            case BUTTON_A: button_cycle = BUTTON_B; break;
            case BUTTON_B: button_cycle = BUTTON_X; break;
        }
    }
        BUTTON_LIGHTBAR:
        led_reset();
        switch(button_cycle) {
            case BUTTON_X: led_set(LED_1, -1.0, 0); break;
            case BUTTON_Y: led_set(LED_2, -1.0, 0);led_set(LED_3, -1.0, 0); break;
            case BUTTON_A: led_set(LED_3, -1.0, 0); break;
            case BUTTON_B: led_set(LED_2, -1.0, 0); break;
        }
    }
    if(moves == MOVES_0)
    {
    if(get_actual(STICK_1_Y) < -60.0)
    {
        combo_run(F22_BF3_F22_BF1);
    }
    else combo_stop(F22_BF3_F22_BF1);
 
    if(get_actual(STICK_1_Y) > 60.0)
    {
        combo_run(B12_BF3_111_BF3);
    }
    else combo_stop(B12_BF3_111_BF3);
 
    if(get_actual(STICK_1_X) < -60.0)
    {
        combo_run(DBA);
    }
    else combo_stop(DBA);
 
    if(get_actual(STICK_1_X) > 60.0)
    {
        combo_run(B12_BF3_23_23_23_DB2AMP);
    }
    else combo_stop(B12_BF3_23_23_23_DB2AMP);
    }
    if(moves == MOVES_1)
    {
    if(get_actual(STICK_1_Y) < -60.0)
    {
        combo_run(B141);
    }
    else combo_stop(B141);
 
    if(get_actual(STICK_1_Y) > 60.0)
    {
        combo_run(BF1_RB_B4);
    }
    else combo_stop(BF1_RB_B4);
 
    if(get_actual(STICK_1_X) < -60.0)
    {
        combo_run(DB3_RB);
    }
    else combo_stop(DB3_RB);
 
    if(get_actual(STICK_1_X) > 60.0)
    {
        combo_run(BF1_RB_B141);
    }
    else combo_stop(BF1_RB_B141);   
    }
    if(moves == MOVES_2)
    {
    if(get_actual(STICK_1_Y) < -60.0)
    {
        combo_run(DB3_RB_4);
    }
    else combo_stop(DB3_RB_4);
 
    if(get_actual(STICK_1_Y) > 60.0)
    {
        combo_run(DB3_RB_B34);
    }
    else combo_stop(DB3_RB_B34);
 
    if(get_actual(STICK_1_X) < -60.0)
    {
 
    }
 
 
    if(get_actual(STICK_1_X) > 60.0)
    {
 
    }   
    }
    if(get_actual(BUTTON))combo_run(rapid);
}
combo rapid
{
    set_val(BUTTON, 100);
    wait(50);
    set_val(BUTTON, 0);
    wait(50);
}
 
combo F22_BF3_F22_BF1
{
    set_val(Forward, 100.0);
    set_val(BUTTON_14, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_14, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(1300);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    set_val(BUTTON_14, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_14, 100.0);
    wait(50);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(15);
    wait(5000);
 
}
 combo B12_BF3_111_BF3
{
    set_val(Back, 100.0);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(300);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(1200);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(700);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.00);
    wait(50);
    wait(5000);
}
 
combo B12_BF3_23_23_23_DB2AMP
{
    set_val(Back, 100.0);
    set_val(BUTTON_17, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(300);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(1200);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(600);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(600);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(600);
    set_val(Back, 100.0);
    wait(50);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    wait(400);
    set_val(BUTTON_14, 100.00);
    wait(50);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(5000);
}
 
combo DBA
{
    set_val(BUTTON_11, 100.0);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    set_val(BUTTON_16, 100.00);
    wait(50);
    wait(5000);
}
 
combo B141
{
    set_val(Back, 100.0);
    set_val(BUTTON_17, 100.0);
    wait(50);
    set_val(BUTTON_15, 100.00);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(5000);
}
 
combo BF1_RB_B4
{
    set_val(Back, 100.0);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(600);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(1000);
    set_val(Back, 100.0);
    set_val(BUTTON_15, 100.0);
    wait(50);
    wait(5000);
}
 
combo DB3_RB
{
    set_val(BUTTON_11, 100.0);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(400);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(5000);
}
 
combo BF1_RB_B141
{
    set_val(Back, 100.0);
    wait(50);
    set_val(Forward, 100.0);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(600);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(1000);
    set_val(Back, 100.0);
    set_val(BUTTON_17, 100.0);
    wait(50);
    set_val(BUTTON_15, 100.0);
    wait(50);
    set_val(BUTTON_17, 100.0);
    wait(50);
    wait(5000);
}
 
combo DB3_RB_4
{
    set_val(BUTTON_11, 100.0);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(400);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(800);
    set_val(BUTTON_15, 100.00);
    wait(50);
    wait(5000);
}
 
combo DB3_RB_B34
{
    set_val(BUTTON_11, 100.0);
    wait(50);
    set_val(Back, 100.0);
    wait(50);
    set_val(BUTTON_16, 100.0);
    wait(50);
    wait(400);
    set_val(BUTTON_4, 100.00);
    wait(50);
    wait(800);
    set_val(Back, 100.0);
    set_val(BUTTON_16, 100.0);
    wait(50);
    set_val(BUTTON_15, 100.0);
    wait(50);
    wait(5000);
}
 
// Display Numbers
void display (uint8 indc)
{
    uint8 VIE;
    VIE = IND[indc];
    display_overlay(VIE, 2000 );
}
 

Trade out the combos once you get them and use this to track what side you on. Also can use rapid hit function!


This will be the dream once I figure the combos out. Thanks for sharing. I will more than likely need some help, ill reach out when I am ready

Thanks
User avatar
RandomCitizen
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Tue Nov 13, 2018 11:40 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: Google [Bot] and 92 guests