Plugin Request Titan two G Tuner IV

Gtuner IV general support. Operation, questions, updates, feature request.

Re: Plugin Request Titan two G Tuner IV

Postby Stunys » Fri Mar 08, 2019 10:17 pm

@Scachi or anyone that can answer this question:

What do Titan 2 users use to plug their controller in and script inputs the same way combo magick does? Instead of using visual scripting or scripting by hand and testing the script every line (mortal kombat combos), I'd like to input a full combo and have the script populated for me through a program if that makes sense or is possible. I don't want to use the few scripts already made for mortal kombat x, I want to make my own! Now I am willing to learn but from what I have found online, combo magick was the way to go and still is. What easy to use feature do we have with the gtuner IV when it comes to making your own scripts on fighting games? I bought my Titan 2 about 2 weeks ago and have learned so much. Please help me learn even more!


What I am asking above, what is the Titan 2's equivalent to ConusMax's MaxCombo?
What I am talking about is: https://device.com/forums/showthread ... own-combos
Discord is Stunys#3295
User avatar
Stunys
Sergeant First Class
Sergeant First Class
 
Posts: 21
Joined: Sun Mar 03, 2019 7:13 am
Location: Fort Campbell, KY

Re: Plugin Request Titan two G Tuner IV

Postby Scachi » Sat Mar 09, 2019 5:58 am

GTuner IV has the "Macro" functionality that allows much longer recordings of input. For gpc code output it needs some additional steps. But it is not that complicated or different.

One way to do it:
Have your T2 connected to your console and pc at the same time.
Start your mk game, go to your training stage where you are ready to perform your input.
Recording:
In GTuner IV "Device Monitor" click the Macro Recorder "REC" button (don't care about the other stuff in this screenshot)
Image
a short count down "3,2,1" will be shown..after that it will record everything (script output too) until you hit the stop button.
I would do one combo and hit the stop button.
After that hit the Save button and name the save file to something useful and place it somewhere in your personal working directory structure for it to show up in Gtuner IV "File Explorer".

Convert to combo:
1:
Double click on the saved .gmk file in the GTuner IV "File Explorer" pane and the macro will be openend in the "Macro Editor".
Click the button "Uncheck All" at the bottom-right, then click each checkbox of all the inputs you need for your combo only.
...or do it the other way around and deselect every checkbox of the input that you do not need for your combo...
Example screenshot:
mac2comb1.jpg
mac2comb1.jpg (186.63 KiB) Viewed 1591 times


2:
if you had multiple attemps to get the combo right or a long pause before or after your combo as you had to walk from your console to your pc you can now scroll to and select the part only you want to keep on via the graph in the macro recorder (left click at start and shift+left click at where you want to stop) and click the "convert macro or selection to GPC combo code".
Example screenshot (blue is my selected part):
mac2comb2.jpg
mac2comb2.jpg (184.23 KiB) Viewed 1591 times


Clicking the button will write the combo to your clipboard as a combo named "Macro2Combo" that you can paste into your .gpc script you are creating. Here are the first few line from my screenshot above:

Code: Select all
combo Macro2Combo {
    wait(104);
    set_val(BUTTON_8, 100.00);
    wait(20);
    set_val(BUTTON_5, 100.00);
    set_val(BUTTON_8, 100.00);
    wait(90);
    set_val(BUTTON_5, 100.00);
    set_val(BUTTON_8, 0.00);
    wait(40);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_8, 0.00);
    wait(100);
    set_val(BUTTON_5, 100.00);
    set_val(BUTTON_8, 0.00);
    wait(20);
    set_val(BUTTON_5, 100.00);
    set_val(BUTTON_8, 100.00);
//...cut
 

You can rename the combo, to run it you need some code like that in your main section. This will run it on press of L3/LS:
Code: Select all
 
main {
    if (event_active(BUTTON_9)) combo_run(Macro2Combo);
}
 



You can run a macro .gmk file directly from a script too.
https://www.consoletuner.com/wiki/index ... :macro_run
You can delete/trim the content and save it as .gmk via the macro editor where you do the gpc combo export.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Plugin Request Titan two G Tuner IV

Postby Stunys » Sun Mar 10, 2019 8:58 pm

This works, and works well! It took a little bit of extra learning on a couple of the steps but I got it. I made my own script that runs great! If anyone wants a MKX script, check out mine for Mileena below (used another script someone made back in 2015 (can't remember their username) and made improvements along with a new combo on R3/L3):

Code: Select all
#pragma METAINFO("Meleena Favorite", 1, 0, "stunys")
#include <titanone.gph>
 
 
// mkx-meleena-_piercing-41%overhead-30%-mid-to-low_both_meterless.gpc
 
//-MKX-MELEENA- PIERCING-41%OVERHEAD-30%-MID-TO-LOW-BOTH OVERHEADS-\\
//-HOLD Forward ANALOG STICK Forward FOR Forward-OVERHEAD OR UP TO RUN-Forward MID TO LOW----\\
//-AND Back FOR Back-OVERHEAD AND DOWN TO RUN Back-MID TO LOW-------\\
//-And R3 for forward 37% with 1 meter burn And L3 for back 1 meter burn
// -----------------------------------------------------------------\\
 
int Forward;
int Back;
 
main {
    // Forward combo
    if (get_val (PS4_RX) >= 60) {
        Forward=16;Back=15;
        combo_run (OVERHEAD);
        }
    // Back combo
    if (get_val (PS4_RX) <= -60) {
        Forward=15;Back=16;
        combo_run (OVERHEAD);
        }
    // Forward corner combo 1 meter burn
    if (get_val (PS4_RY) <= -60) {
        Forward=16;Back=15;
        combo_run(LOWNOMETER);
        }
    // Back corner combo 1 meter burn
    if (get_val (PS4_RY) >= 60) {
        Forward=15;Back=16;
        combo_run(LOWNOMETER);
        }
    // Low Forward combo
    if (event_active(BUTTON_6))  {
        Forward=16;Back=15;
        combo_run(LOWMETER);
    }
    // Low Back combo
    if (event_active(BUTTON_9))  {
        Forward=15;Back=16;
        combo_run(LOWMETER);
    }
    // combo cancel       
    if ( abs(get_val (PS4_RX)) <= 20) {
        combo_stop (OVERHEAD);
        }
    if (abs(get_val (PS4_RY)) <= 20) {
        combo_stop (LOWNOMETER);
        }
}
 
 
  //----------------------------------------
combo OVERHEAD {
    set_val(Forward, 100);
    wait(20);
    set_val(Forward, 100);
    set_val(19, 100);
    wait(90);
    set_val(Forward, 100);
    wait(100);
    set_val(Forward, 100);
    set_val(18, 100);
    wait(110);
    set_val(Forward, 100);
    wait(130);
    set_val(Forward, 100);
    set_val(19, 100);
    wait(70);
    set_val(19, 100);
    wait(120);
    wait(950);
    set_val(Back, 100);
    wait(70);
    set_val(14, 100);
    wait(70);
    wait(20);
    set_val(18, 100);
    wait(50);
    wait(720);
    set_val(13, 100);
    wait(190);
    set_val(13, 100);
    set_val(17, 100);
    wait(10);
    set_val(17, 100);
    wait(310);
    wait(520);
    set_val(Forward, 100);
    set_val(17, 100);
    wait(90);
    set_val(Forward, 100);
    wait(60);
    set_val(Forward, 100);
    set_val(20, 100);
    wait(120);
    set_val(20, 100);
    wait(20);
    wait(110);
    set_val(17, 100);
    wait(10);
    set_val(17, 100);
    set_val(18, 100);
    wait(300);
    set_val(18, 100);
    wait(10);
} 
//----------------------------------------
combo LOWMETER {
 
   set_val(Forward,100);
   set_val(20,100);
   wait(100);
   set_val(17,100);
   wait(200);
   set_val(Back,100);
   set_val(18,100);   //combo 1
   wait(400);
   set_val(14,100);
   wait(70);
    set_val(14,0);
    wait(50);
   set_val(14,100);
   wait(70);
    set_val(14,0);
    wait(100);
   set_val(19,100);
   set_val(4,100);    //combo 2
   wait(900);
   set_val(Back,100);
   wait(80);
   set_val(Forward,100);
   wait(80);
   set_val(20,100);   //combo 3
   wait(800);
   set_val(Back,100);
   wait(80);
   set_val(14,100);
   wait(80);
   set_val(18,100);   //combo 4
   wait(850);
   set_val(Forward,100);
   set_val(17,100);
   wait(80);
   set_val(20,100);
   wait(80);
   set_val(17,100);
   set_val(18,100);
   wait(80);
}
//-------------------------------------------
combo LOWNOMETER {
    wait(10);
    set_val(Back, 100.00);
    set_val(17, 100.00);
    wait(110);
    set_val(Back, 0.00);
    set_val(17, 0.00);
    wait(80);
    set_val(20, 100.00);
    wait(120);
    set_val(20, 0.00);
    wait(30);
    set_val(Back, 100.00);
    wait(100);
    set_val(14, 100.00);
    set_val(Back, 100.00);
    wait(20);
    set_val(14, 100.00);
    set_val(Back, 100.00);
    set_val(18, 100.00);
    wait(30);
    set_val(14, 100.00);
    set_val(Back, 0.00);
    set_val(18, 100.00);
    wait(120);
    set_val(14, 0.00);
    set_val(18, 100.00);
    wait(20);
    set_val(18, 0.00);
    wait(640);
    set_val(13,100.00);
    wait(30);
    set_val(13, 0.00);
    wait(80);
    set_val(17, 100.00);
    wait(190);
    set_val(17, 0.00);
    wait(800);
    set_val(Forward, 100.00);
    set_val(20, 100.00);
    wait(120);
    set_val(Forward, 0.00);
    set_val(20, 100.00);
    wait(20);
    set_val(20, 0.00);
    wait(60);
    set_val(17, 100.00);
    wait(120);
    set_val(17, 0.00);
    wait(70);
    set_val(19, 100.00);
    wait(10);
    set_val(19, 100.00);
    set_val(20, 100.00);
    wait(200);
    set_val(19, 100.00);
    set_val(20, 0.00);
    wait(10);
    set_val(19, 0.00);
    wait(170);
    set_val(14, 100.00);
    wait(80);
    set_val(14, 0.00);
    wait(60);
    set_val(14, 100.00);
    wait(40);
    set_val(14, 100.00);
    set_val(17, 100.00);
    wait(60);
    set_val(14, 0.00);
    set_val(17, 100.00);
    wait(830);
    set_val(17, 0.00);
    wait(100);
}
Discord is Stunys#3295
User avatar
Stunys
Sergeant First Class
Sergeant First Class
 
Posts: 21
Joined: Sun Mar 03, 2019 7:13 am
Location: Fort Campbell, KY

Re: Plugin Request Titan two G Tuner IV

Postby Stunys » Mon Mar 11, 2019 8:15 am

I have another question for you. I'm trying to use a script that is posted elsewhere but I have a syntax error for a command int switch; but cannot find a way to fix the issue anywhere online. Deleting causes even more problems so there must be a reason it is there. I'm a visual learner so I'll post the script and if you find the fix, please let me know so I can use that knowledge in the future. Thanks!

Code: Select all
#pragma METAINFO("Sonya Covert", 1, 0, "unknown")
#include <titanone.gph>
 
//Posted : Monday 11th of March, 2019 8:11 UTC 
 
define BF_Y                                    =  17; // TRIANGLE, Y
define BF_B                                    =  18; // CIRCLE, B 
define BF_A                                    =  19; // CROSS, A
define BF_X                                    =  20; // SQUARE, X
define BR1                                     =   3; // R1, RB   
define BR2                                     =   4; // R2, RT   
define BL1                                     =   6; // L1, LB   
define BL2                                     =   7; // L2, LT   
define UP                                      =  13; // DPAD UP   
define DOWN                                    =  14; // DPAD DOWN
define LEFT                                    =  15; // DPAD LEFT 
define RIGHT                                   =  16; // DPAD RIGHT 
define MOVE_X                                  =  11; // LEFT ANALOG X
define MOVE_Y                                  =  12; // LEFT ANALOG Y
define BACK                                    = 128; // BACK FLAG   
define FORWARD                                 = 129; // FORWARD FLAG
 
define EOC              = 254;
define EOD              = 255;
 
define RIGHTstickRIGHT                         =0;
define RIGHTstickLEFT                          =1;
define RIGHTstickUP                            =2;
define RIGHTstickDOWN                          =3;
define LEFTstickRIGHT                          =4;
define LEFTstickLEFT                           =5;
define LEFTstickDOWN                           =6;
define LEFTstickUP                             =7;
define LEFTstickPRESS                          =8;
define RIGHTstickPRESS                         =9;
define DOWNA                                   =10;
define sRIGHTstickRIGHT                         =11;
define sRIGHTstickLEFT                          =12;
define sRIGHTstickUP                            =13;
define sRIGHTstickDOWN                          =14;
define sLEFTstickRIGHT                          =15;
define sLEFTstickLEFT                           =16;
define sLEFTstickDOWN                           =17;
define sLEFTstickUP                             =18;
define sLEFTstickPRESS                          =19;
define sRIGHTstickPRESS                         =20;
 
// data segment
data(
 
sRIGHTstickRIGHT,
2,BACK,100,
BF_X,100,4,0,4,
2,BACK,100,
BF_B,100,4,0,10,
1,DOWN,100,4,0,4,
1,BACK, 100,4,0,4,
1,BF_Y,100,4,0,40,
 
1,BF_A,100,4,0,65,
 
1,FORWARD,100,4,0,4,
2,FORWARD,100,
BR2,100,4,0,23,
 
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,53,
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,55,
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,52,
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,4,
1,BF_B,100,4,0,200,
 
EOC,
 
sRIGHTstickLEFT,
1,DOWN,100,4,0,1,
1,BACK,100,4,0,1,
2,BF_X,100,
BR2,100,4,0,40,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,200,
 
EOC,
 
sRIGHTstickUP,
2,BACK,100,
UP,100,4,0,10,
2, DOWN,100,
BF_B,100,4,0,30,
2,FORWARD,100,
BF_X,100,4,0,4,
2,FORWARD,100,
BF_B,100,4,0,40,
1, DOWN,100,4,0,4,
1,FORWARD,100,4,0,4,
1, BF_Y,100,4,0,25,
 
1,BF_A,100,4,0,65,
 
1,BACK,100,4,0,4,
2,BACK,100,
BR2,100,4,0,23,
 
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,53,
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,55,
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,52,
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,4,
1,BF_B,100,4,0,200,
EOC,
 
sRIGHTstickDOWN,
2, BACK,100,
BF_A,100,4,0,4,
2,BACK,100,
BF_A,100,4,0,20,
1, DOWN,100,4,0,4,
1,BACK, 100,4,0,4,
1,BF_Y,100,4,0,30,
 
1,BF_A,100,4,0,65,
 
1,FORWARD,100,4,0,4,
2,FORWARD,100,
BR2,100,4,0,23,
 
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,53,
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,55,
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,52,
1,BF_X,100,4,0,4,
1,BF_Y,100,4,0,4,
1,BF_B,100,4,0,200,
EOC,
 
 
RIGHTstickRIGHT,                             
2,BACK,100,
BF_X,100,4,0,4,
2,BACK,100,
BF_B,100,4,0,10,
1,DOWN,100,4,0,4,
1,BACK, 100,4,0,4,
1,BF_Y,100,4,0,40,
 
1,BF_B,100,4,0,79,
 
1,FORWARD,100,34,0,4,
1,BF_Y,100,4,0,4,
1,BF_X,100,4,0,45,
1,FORWARD,100,4,0,4,
2,FORWARD,100,
BR2,100,4,0,18,
1,BF_Y,100,4,0,4,
1,BF_X,100,4,0,4,
2, UP,100,
BF_B,100,4,0,200,
 
EOC,
 
RIGHTstickLEFT,
1,DOWN,100,4,0,1,
1,BACK,100,4,0,1,
2,BF_X,100,
BR2,100,4,0,40,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,30,
1,BF_Y,100,4,0,200,
 
 
 
EOC,
 
RIGHTstickUP,
2,FORWARD,100,
UP,100,4,0,10,
2, DOWN,100,
BF_B,100,4,0,30,
2, FORWARD,100,
BF_A,100,4,0,4,
2,FORWARD,100,
BF_A,100,4,0,40,
1, DOWN,100,4,0,4,
1,FORWARD, 100,4,0,4,
1, BF_Y,100,4,0,25,
1,BF_B,100,4,0,79,
 
1,BACK,100,34,0,4,
1,BF_Y,100,4,0,4,
1,BF_X,100,4,0,45,
1,BACK,100,4,0,4,
2,BACK,100,
BR2,100,4,0,18,
1,BF_Y,100,4,0,4,
1,BF_X,100,4,0,4,
2, UP,100,
BF_B,100,4,0,200,
EOC,
 
RIGHTstickDOWN,
2, BACK,100,
BF_A,100,4,0,4,
2,BACK,100,
BF_A,100,4,0,20,
1, DOWN,100,4,0,4,
1,BACK, 100,4,0,4,
1, BF_Y,100,4,0,25,
1,BF_B,100,4,0,79,
 
1,FORWARD,100,34,0,4,
1,BF_Y,100,4,0,4,
1,BF_X,100,4,0,45,
1,FORWARD,100,4,0,4,
2,FORWARD,100,
BR2,100,4,0,18,
1,BF_Y,100,4,0,4,
1,BF_X,100,4,0,4,
2, UP,100,
BF_B,100,4,0,200,
 
EOC,
 
LEFTstickRIGHT,
 
EOC,
 
LEFTstickLEFT,
1,BACK,100,4,0,4,
1,FORWARD,100,4,0,4,
1,DOWN,100,4,0,4,
1,BF_Y,100,4,0,4,
EOC,
sLEFTstickLEFT,
1,BACK,100,4,0,4,
1,FORWARD,100,4,0,4,
1,DOWN,100,4,0,4,
1,BF_Y,100,4,0,4,
EOC,
LEFTstickDOWN,
1,UP,100,4,0,45,
1,UP,100,4,0,4,
1,UP,100,4,0,4,
1,FORWARD,100,4,0,4,
1,DOWN,100,4,0,4,
EOC,
sLEFTstickDOWN,
1,UP,100,4,0,45,
1,UP,100,4,0,4,
1,UP,100,4,0,4,
1,FORWARD,100,4,0,4,
1,DOWN,100,4,0,4,
EOC,
 
LEFTstickUP,
 
EOC,
 
LEFTstickPRESS,
 
EOC,
 
RIGHTstickPRESS,
1,FORWARD,100,2,0,2,
1,BACK,100,2,0,2,
1,DOWN,100,2,0,2,
1,BACK,100,2,0,2,
1,BF_Y,100,4,0,4,
EOC,
sRIGHTstickPRESS,
1,FORWARD,100,2,0,2,
1,BACK,100,2,0,2,
1,DOWN,100,2,0,2,
1,BACK,100,2,0,2,
1,BF_Y,100,4,0,4,
EOC,
 
EOD );
 
 
// Unmaps
unmap PS4_L3;
unmap PS4_LY;
unmap PS4_LX;
 
 
// Variables
int i = -1, b, v;
int back = LEFT, forward = RIGHT;
int button_1, button_2, button_3, button_4, button_5
int value_1, value_2, value_3, value_4, value_5; 
int wait_time;                               
int switch;
int RUMBLE_TYPE=RUMBLE_A;                               
int delay_t;                                                             
int cancel;                 
 
main {                                       
 
 
 
    if (event_release(PS4_L2)){  //CREDIT TO SOLO FOR SWITCH SCRIPT                                                                         
         switch=!switch;                                                                           
      set_val(PS4_L2 ,0);                         
    } 
 
 
 
 // Determine Back and Forward           
    if(get_val(RIGHT) ) {
        back = LEFT; forward = RIGHT;           
    } else if(get_val(LEFT)) {
        back = RIGHT; forward = LEFT;         
    }                                       
 
    // If there is a combo to be executed       
    if(i >= 0 && delay_t<=0) {                               
        // Execute the combo step-by-step       
        if(!combo_running(execute_step)) {     
            if(get_step_values()) {             
                if(wait_time == 0) {               
                    combo_run(execute_step_no_wait);
                } else {                         
                    combo_run(execute_step);     
                }                               
            } else { // the combo finished       
                i = -1;                         
            }                                   
        } 
 
 
    // CANCEL combos condition-----------------------------------------
        // RS X and Y are in rest - cancel the combo             
       if(cancel==1){           
            if ( (abs(get_val (9)) <= 20 && abs(get_val (10)) <= 20) ) {
            i = -1;                       
            combo_stop(execute_step);     
            }
        }else if(cancel==2){
            if ( (abs(get_val (11)) <= 20 && abs(get_val (12)) <= 20) ) {
            i = -1;                       
            combo_stop(execute_step);     
            }
        }                                                             
 
 
        // Make sure the user inputs does not interfere in the combo
        set_val(BF_Y                                    , 0);                       
        set_val(BF_B                                    , 0);                       
        set_val(BF_A                                    , 0);                       
        set_val(BF_X                                    , 0);                       
        set_val(BR1                                     , 0);                       
        set_val(BR2                                     , 0);                       
        set_val(BL1                                     , 0);                       
        set_val(BL2                                     , 0);                       
        set_val(UP                                      , 0);                       
        set_val(DOWN                                    , 0);                       
        set_val(LEFT                                    , 0);                       
        set_val(RIGHT                                   , 0);                       
        set_val(MOVE_X                                  , 0);                       
        set_val(MOVE_Y                                  , 0);                       
 
    // if no combo execute - look for combo activation 
    } else {                                       
    // EDIT THIS PART OF SCRIPT for combo run ---------------------------
//////////////////////////////////////////////////////////////////////////
      if(switch){ 
 
       // RS DOWN to Activate 
        if (get_val (9) <= -60) {                                                       
        cancel=1
        i = get_combo_index(sRIGHTstickLEFT);
        } 
        // Press RS UP to Activate                                                                         
        if (get_val (9) >= 60) { 
        cancel=1;
        i = get_combo_index(sRIGHTstickRIGHT);
        }
        // RS LEFT                                                           
        if (get_val (10) <= -60) {   
        cancel=1;   
        i = get_combo_index(sRIGHTstickUP);
        } 
        /////RS RIGHT
        if (get_val (10) >= 40) {   
        cancel=1;
        i = get_combo_index(sRIGHTstickDOWN);
        } 
        // LS UP 
        if (get_val (12)<= -60) { 
        cancel=2;
        i = get_combo_index(sLEFTstickUP);
        } 
        // LEFT Stick Pressed
        if (get_val (5)) {                   
        cancel=3;                             
        i = get_combo_index(sLEFTstickPRESS);
        }
        // RIGHT Stick Pressed
        if (get_val (8)) {                   
        cancel=3;                             
        i = get_combo_index(sRIGHTstickPRESS);
        } 
        // LS DOWN                                                         
        if (get_val (12) >= 60) {   
        cancel=2
        i = get_combo_index(sLEFTstickDOWN);
        } 
        // LS LEFT                                                           
        if (get_val (11)<= -60) {   
        cancel=2
        i = get_combo_index(LEFTstickLEFT);
        } 
        // LS RIGHT                                                           
        if (get_val (11)>= 60) {   
        cancel=2
        i = get_combo_index(LEFTstickRIGHT);
        } 
    // switch                             
      }else{ 
       // RS DOWN to Activate 
        if (get_val (9) <= -60) {                                                       
        cancel=1
        i = get_combo_index(RIGHTstickLEFT);
        } 
        // Press RS UP to Activate                                                                         
        if (get_val (9) >= 60) { 
        cancel=1;
        i = get_combo_index(RIGHTstickRIGHT);
        }
        // RS LEFT                                                           
        if (get_val (10) <= -60) {   
        cancel=1;   
        i = get_combo_index(RIGHTstickUP);
        } 
        /////RS RIGHT
        if (get_val (10) >= 40) {   
        cancel=1;
        i = get_combo_index(RIGHTstickDOWN);
        } 
        // LS UP 
        if (get_val (12)<= -60) { 
        cancel=2;
        i = get_combo_index(LEFTstickUP);
        } 
        // LEFT Stick Pressed
        if (get_val (5)) {                   
        cancel=3;                             
        i = get_combo_index(LEFTstickPRESS);
        }
        // RIGHT Stick Pressed
        if (get_val (8)) {                   
        cancel=3;                             
        i = get_combo_index(RIGHTstickPRESS);
        } 
        // LS DOWN                                                         
        if (get_val (12) >= 60) {   
        cancel=2
        i = get_combo_index(LEFTstickDOWN);
        } 
        // LS LEFT                                                           
        if (get_val (11)<= -60) {   
        cancel=2
        i = get_combo_index(LEFTstickLEFT);
        } 
        // LS RIGHT                                                           
        if (get_val (11)>= 60) {   
        cancel=2
        i = get_combo_index(LEFTstickRIGHT);
        } 
 
 
 
 
 
    // end editing here --------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////////
    }// <combo activation> end
 
 
 
 
 
}//<main> block end                                 
}                                                   
// This combo will run a step with wait             
combo execute_step {                               
    set_buttons_values();                           
    wait(wait_time);                               
    set_buttons_values();                         
}                                                 
 
// This combo will run a step without wait         
combo execute_step_no_wait {                       
    set_buttons_values();                         
}                                                                                                                                                       
 
// Returns the starting index of a combo           
function get_combo_index(combo_id) {               
    i = 0;                                         
    while(TRUE) {//-----------------------         
        v = dbyte(i);                             
        if(v == combo_id) {                       
            return(i + 1);                         
        } else {//====================             
            while(v != EOC && v != EOD) {//#       
                i = i + 1;                         
                v = dbyte(i);                     
            }//#                                   
            if(v == EOD) break;                   
            else i = i + 1;                       
        }//=============================           
    }//-----------------------------------         
    return(-1);                                   
}                                                 
 
// Set the buttons, values and wait time of a step
function get_step_values() {                       
    b = dbyte(i); i = i + 1;                       
    if(b > 5) return(FALSE);                       
 
    if(b >= 1) {                                   
        button_1 = convert_back_forward(dbyte(i)); i = i + 1;
        value_1 = dbyte(i); i = i + 1;             
    } else { button_1 = -1; value_1 = 0; }         
 
    if(b >= 2) {                                     
        button_2 = convert_back_forward(dbyte(i)); i = i + 1;
        value_2 = dbyte(i); i = i + 1;               
    } else { button_2 = -1; value_2 = 0; }           
 
    if(b >= 3) {                                     
        button_3 = convert_back_forward(dbyte(i)); i = i + 1;
        value_3 = dbyte(i); i = i + 1;               
    } else { button_3 = -1; value_3 = 0; }           
 
    if(b >= 4) {                                     
        button_4 = convert_back_forward(dbyte(i)); i = i + 1;
        value_4 = dbyte(i); i = i + 1;               
    } else { button_4 = -1; value_4 = 0; }           
 
    if(b >= 5) {                                     
        button_5 = convert_back_forward(dbyte(i)); i = i + 1;
        value_5 = dbyte(i); i = i + 1;               
    } else { button_5 = -1; value_5 = 0; }           
 
    wait_time = dbyte(i); i = i + 1;                 
    wait_time = (wait_time - 1) * 10;               
    if(wait_time < 0) wait_time = 0;                 
    else if(wait_time > 2530) wait_time = 2530;       
 
    return(TRUE);                                   
}                                                   
 
// If the step has FORWARD and BACK buttons, set the correct value.
function convert_back_forward(button) {             
    if(button == FORWARD) {                         
        return(forward);                             
    } else if(button == BACK) {                     
        return(back);                               
    }                                               
    return(button);                                 
}                                                     
 
// Set the buttons and values, function used on the combos.
function set_buttons_values() {                     
    if(button_1 != -1) set_val(button_1, value_1);   
    if(button_2 != -1) set_val(button_2, value_2);   
    if(button_3 != -1) set_val(button_3, value_3);   
    if(button_4 != -1) set_val(button_4, value_4);   
    if(button_5 != -1) set_val(button_5, value_5);   
 
}
Discord is Stunys#3295
User avatar
Stunys
Sergeant First Class
Sergeant First Class
 
Posts: 21
Joined: Sun Mar 03, 2019 7:13 am
Location: Fort Campbell, KY

Re: Plugin Request Titan two G Tuner IV

Postby Scachi » Mon Mar 11, 2019 9:44 am

switch is a function name in gpc2 language and can't be used as a variable.
You have to rename the switch variable in this script to something else and its usage throughout the whole script.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Plugin Request Titan two G Tuner IV

Postby Stunys » Mon Mar 11, 2019 12:34 pm

How would you fix the script?
Discord is Stunys#3295
User avatar
Stunys
Sergeant First Class
Sergeant First Class
 
Posts: 21
Joined: Sun Mar 03, 2019 7:13 am
Location: Fort Campbell, KY

Re: Plugin Request Titan two G Tuner IV

Postby Scachi » Mon Mar 11, 2019 12:48 pm

Stunys wrote:How would you fix the script?

rename every "switch" in this script to "iswitch"
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Plugin Request Titan two G Tuner IV

Postby Stunys » Fri Mar 15, 2019 11:40 pm

Scachi wrote:
Stunys wrote:How would you fix the script?

rename every "switch" in this script to "iswitch"


I'm going to continue this thread for questions if you don't mind since you have been getting me leap years of knowledge after every answer lol. Thank you for that.

New question.. most mkx scripts use the right stick for combos. I plan to continue using the right stick but right now I am limited to 2 combos however. Right stick right/left will perform the same combo but by pushing towards the opponent and the same thing for up and down. The script I posted above allows for the right stick to perform 4 different combos and it doesn't matter which side of the opponent you are on. I have been trying to learn how and why so I could do the same for my created combos but haven't had any success. How does it manage to have 4 working combos on the right stick?

Also, the script unmaps L3 completely and then uses L3 for 4 separate combos as well. I tried to the best of my knowledge to create that same feature in my own scripts but can't figure it out. How does the script allow the Left stick to be used for combos?

Lastly, I am used to the set_val(20,100) format for righting combos to show pressing square for example. The script above writes that out in a much different way. How could I convert the way that script is written out so I can edit the combos due to them no longer working because of game patches?


P.S. If you would prefer I can start my own thread so these questions don't get lost here because I'm sure all of this help you are giving me would help others! Once I am happy with my scripts for MKX I will post them on the forums to pay the website forward for the amazing support. I have about 4 working scripts at the moment which 2 of them I made from scratch.
Discord is Stunys#3295
User avatar
Stunys
Sergeant First Class
Sergeant First Class
 
Posts: 21
Joined: Sun Mar 03, 2019 7:13 am
Location: Fort Campbell, KY

Re: Plugin Request Titan two G Tuner IV

Postby Scachi » Sat Mar 16, 2019 5:37 pm

You have a better chance to get help for tose specific questions with a new thread I guess.

I am sorry, I have not the time at the moment to take a detailed look at the script to read how it does all that.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Previous

Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 84 guests