Convert Titan One scripts to Titan Two the easy way

Tutorials, How-tos and FAQs for the Titan Two device.

Re: Convert Titan1 scripts to Titan2 the easy way

Postby Scachi » Wed Aug 29, 2018 6:43 am

This is a tutorial, so it is not about offering the script to download, it is for getting an idea how to do a T1->T2 conversation yourself.

If you enter your forum credentials in GTuner IV, you are able to upload scripts to the online resource, too.
GTuner IV->Tools->Preferences->Consoletuner: username and password. The username is case sensitive, too.

The T1 had no "graphical options"/Interactive Configuration for user-made script.
So you won't get one "automagicaly" by just converting the T1 script to T2 using the titanone.gph header file.
To add Interactive Configuration it needs some of coding/changes to an existing script:
A small guide for that : viewtopic.php?f=26&t=5045
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Convert Titan1 scripts to Titan2 the easy way

Postby W168 » Wed Aug 29, 2018 2:34 pm

Hello Scachi.

Thanks for the infos :)
W168
Sergeant
Sergeant
 
Posts: 8
Joined: Mon Aug 13, 2018 3:03 pm

Re: Convert Titan1 scripts to Titan2 the easy way

Postby Syndicate HD » Sat Oct 06, 2018 12:26 am

Just got my T2 delivered today. Would like to jump right in using scripts but needing to convert my CM+ scripts into T2.

I tried to follow the tut instructions here but seem to run into issue after adding the two code convert lines and try to save my current CM+ script.

Anybodys help would be greatly appreciated. (I have loads and loads of COD script files I would like to migrate to T2).

I assume this is possible without too much effort or headache?
User avatar
Syndicate HD
Staff Sergeant
Staff Sergeant
 
Posts: 12
Joined: Thu Oct 04, 2018 4:26 pm

Re: Convert Titan1 scripts to Titan2 the easy way

Postby Raptor_Titan2 » Sat Oct 06, 2018 12:47 am

Syndicate HD wrote:Just got my T2 delivered today. Would like to jump right in using scripts but needing to convert my CM+ scripts into T2.

I tried to follow the tut instructions here but seem to run into issue after adding the two code convert lines and try to save my current CM+ script.

Anybodys help would be greatly appreciated. (I have loads and loads of COD script files I would like to migrate to T2).

I assume this is possible without too much effort or headache?


What I've seen moderators say to others was post scripts and someone may help you. Also a reminder if you didn't create the script yourself don't forget to give credit where it's due.
User avatar
Raptor_Titan2
Sergeant Major
Sergeant Major
 
Posts: 97
Joined: Wed Oct 07, 2015 8:08 pm

Re: Convert Titan1 scripts to Titan2 the easy way

Postby Scachi » Sat Oct 06, 2018 5:18 am

Syndicate HD wrote:Just got my T2 delivered today. Would like to jump right in using scripts but needing to convert my CM+ scripts into T2.

I tried to follow the tut instructions here but seem to run into issue after adding the two code convert lines and try to save my current CM+ script.

Anybodys help would be greatly appreciated. (I have loads and loads of COD script files I would like to migrate to T2).

I assume this is possible without too much effort or headache?


For CM > T2 there are some more things to watch out for in the output panel when adding the #include <titanone.gph> line and hitting the compile button :

The CM seems to allow the same name used for a variable and a combo, error example where combo and int is 'Double_Tact':
Code: Select all
ERROR line 41: redefinition of 'Double_Tact'

You have to rename one of them through the entire script. I usually prefix the combo name with a c :
Code: Select all
cDouble_Tact

through the entire script means you must change all the combo_whatever(Double_Tact) to combo_whatever(cDouble_Tact)

If you have no success doing it yourself post the cm code.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Convert Titan1 scripts to Titan2 the easy way

Postby Sillyasskid » Sat Oct 06, 2018 7:50 am

Fixing Invalid symbol redefinition errors can be done, by doing the following.

Method 1)
Use the Find/Replace tab.
Copy and paste this into the find what box: 'combo '
- Important make sure there is an empty space in front of the word combo.

Then copy and paste this into the replace with box 'combo c' Image
Then click Replace All

Then including this code below to the script will solve the Invalid symbol redefinition errors
Code: Select all
#include <titanone.gph>
#undef combo_stop
#undef combo_run
#undef combo_running
#define combo_stop(a)  combo_stop(c##a)
#define combo_run(a)  combo_run(c##a)
#define combo_running(a) combo_running(c##a) 
#define combo(a) combo c##a
#define call(a) call(c##a)
#define wait(a) ;wait(int)a);
#undef set_val
#define set_val(a) ;set_val((int)a);


Method 2)
Alternatively you can enclose each combo declaration with parentheses like this
Code: Select all
combo (my_combo) { 
  ...
}
You will still need to include the same code from the first method though.

Here is an example script
Code: Select all
#include <titanone.gph>
#undef combo_stop
#undef combo_run
#undef combo_running
#define combo_stop(a)  combo_stop(c##a)
#define combo_run(a)  combo_run(c##a)
#define combo_running(a) combo_running(c##a) 
#define combo(a) combo c##a
#define call(a) call(c##a)
#define wait(a) ;wait(int)a);
#undef set_val
#define set_val(a) ;set_val((int)a);
 
int one;
int two;
int three;
 
main { ... }
 
combo (one)  { ... }
 
combo (two)  { ... }
 
combo (three)  { ... }
 
combo four  { ... }
 
You only need to enclose the effected combos in parentheses. Since combo four does not share the same name as one of the the int variables. I did not need to enclose it with parentheses. However if I was to, it would be perfectly fine still. There would be no error.

Lastly, this is intended to only fix the Invalid symbol redefinition errors.
Your CM script may still cough up errors when trying to convert it over to the Titan two.
Missing semi colons ' ; ' are very prevalent with CM scripts, these will cause errors. So look out for them.
User avatar
Sillyasskid
Captain
Captain
 
Posts: 574
Joined: Sat May 14, 2016 3:07 am

Re: Convert Titan1 scripts to Titan2 the easy way

Postby Syndicate HD » Mon Oct 08, 2018 5:02 pm

I appreciate everyone's input, very helpful.

I think what may work best for me (learning purposes) is to post CM code and let someone convert it to T2.

Once someone converts to T2 code, it would be extremely helpful to me if that someone can add some notes
that describes what was added to the CM code to convert to T2 and any edits/changes made to the code.

I seem to learn better that way when given an example I can look at and study to understand it better. From
there I should be ok converting on my own, with maybe a few questions along the way if I happen to stumble.

Here is the code (BO3):
Code: Select all
/*********************************************************************************************** 
 This Script was made and intended for http://www.device.com & device ONLY.                     *
 UNLESS permission is given by the creator and/or copywritee,                                  *
 All rights reserved. This material may not be reproduced, displayed,                          *
 modified or distributed without the express prior written permission of the                   *
 copyright holder. For permission, contact ControlerMax                                        *
     __  ____   ___   ____   __ __  _____ ___ ___   ____  __ __                                *
    /  ]|    \ /   \ |    \ |  |  |/ ___/|   |   | /    ||  |  |                               *
   /  / |  D  )     ||  _  ||  |  (   \_ | _   _ ||  o  ||  |  |                               *
  /  /  |    /|  O  ||  |  ||  |  |\__  ||  \_/  ||     ||_   _|                               *
 /   \_ |    \|     ||  |  ||  :  |/  \ ||   |   ||  _  ||     |                               *
 \     ||  .  \     ||  |  ||     |\    ||   |   ||  |  ||  |  |                               *
  \____||__|\_|\___/ |__|__| \__,_| \___||___|___||__|__||__|__|                               *
                                                                                               *
************************************************************************************************/

 
// COD BLACK OPS III [S.G.I.] Mouse and Keyboard  ver. 9.1     
//--------------------------------------------------------------                                 
// Authors  : Excalibur, LEX LOST, WHITE 4ND N3RDY , k4rL01 , x22dot                                             
// Game     : CoD BLACK OPS III                                                               
// Device   : device PLUS                                                                   
// Console  : XBOX ONE, XBOX 360, PS 4, PS 3                                                   
// Game pads: All supported Game pads                                                         
 
// IMPORTANT : All mods are available only in application : BLACK OPS III 
//--------------------------------------------------------------                             
//                                                                                           
/****************************************************************************
 
TOGGLES: You MUST press and hold the "first" button first before pressing the other button.
 
 
=============================================================================
*****************************************************************************/

/***************************************************************
    INSTRUCTIONS                                               
 
 ----------------------------------------------------------------
 Class 1. RAPID FIRE                                                                                               
 
 //1. RAPID FIRE  SECONDARY WEAPON     
 
 ----------------------------------------------------------------
 Class 5. SCOPE MODE                                                                                               
 
 //1. QUICK SCOPE  On / Off  => CEMU_EXTRA1
 
 ----------------------------------------------------------------
 Class 4. SHOT MODE                                                                                                 
 
 //1. DROP SHOT  On / Off => CEMU_EXTRA1 + D pad Down     
 
 //2. JUMP SHOT  On / Off => CEMU_EXTRA1 + D pad Up             
 
 //3. SIDE SHOT  On / Off => CEMU_EXTRA1 + D pad Right     
 
 //4. Scope Shot On / Off => CEMU_EXTRA1 + D pad Left     
 
 ----------------------------------------------------------------
 Class 8. SPECIAL ABILITY                                                                                                 
 
 // Activate it with  => XB1_RS
 
//----------------------------------------------------------------
// Class 17. AIM ASSIST                                           
 // hold XB1_A + press XB1_X
 
********************************************************/

////////////////////////////////////////////////////////                                   
//                                   
//  BUTTON LAYOUT    : DEFAULT                 
//  BUMPERS/TRIGGERS : DEFAULT
//  STICK LAYOUT     : DEFAULT
//------------------------------------------------------
define FIRE_BTN      = XB1_RT; // default RT                       
define ADS_BTN       = XB1_LT; // LT                       
define SPRINT_BTN    = XB1_LS; // LS                       
define PRONE_BTN     = XB1_B; // B                         
define JUMP_BTN      = XB1_A; // A                         
define SWITCH_WEAPON = XB1_Y; // Y                         
define RELOAD_BTN    = XB1_X; // X                         
define MELEE         = XB1_RS; // RS/R3                     
define LETHAL        = XB1_RB; // RB                       
define TACTICAL      = XB1_LB; // LB                       
define Up            = XB1_UP;                             
define Right         = XB1_RIGHT;                             
define Down          = XB1_DOWN;                             
define Left          = XB1_LEFT;                               
define R_X           = XB1_RX;                             
define R_Y           = XB1_RY;                               
define L_X           = XB1_LX;                             
define L_Y           = XB1_LY;                             
////////////////////////////////////////////////////////
//                       
define dropDelay    =300;//300
define timelimit    =300;
define NotUse       =  0;
 
int value   =  33;
int value2  = -33;
int delay   =  12;
int aim_assist_on  = TRUE;//AIM ASSIST
////////////////////////////////////////////////////////
//                       
 
int RA;                   
int LX;
int LY;
int hold_timeA  = 25; // Akimbo Rapid Fire
int rest_timeA  = 5; // -----  || --------
int hold_time = 35// All Weapons
int rest_time = 35;                 
int hold_timeP = 35// Primary Weapon
int rest_timeP = 35;                 
int hold_timeS = 30; // secondary
int rest_timeS = 10; // secondary
int hold_time_B = 31;   
int rest_time_B = 11;   
 
////////////////////////////////////////////////////////
//  Boolean Variables             
int rapid_onoff          = FALSE
int RF_ALL_weapons       = FALSE
int burst_onoff          =FALSE; // On/Off Burst Fire
int akimbo_onoff         = FALSE; // On/Off Akimbo mode
int Akimbo_Secondary     =FALSE; // On/Off Akimbo mode
int dropshot_OnOff       =FALSE; // On/Off Drop Shot 
//int side_shot_OnOff      =FALSE;   
int JumpShot_OnOff       =FALSE;   
int ScopeShot            = FALSE;   
int QuickScope           = FALSE;   
int SniperOnOff          =FALSE;   
int hold_breath_On_Off   = FALSE;   
int Prim_SecondWeapon    = FALSE;   
int PrimaryWeapon        =FALSE;   
int BurstMelee          = TRUE;   
int SecondaryWeapon      =FALSE;   
int SpecialAbility_OnOff = TRUE;   
int InvertYaxis          =FALSE;   
int TogleADS             = FALSE; // On /Off Togle ADS   
int HipFireAssist        =FALSE;//AimAssist for Hip fire                                 
int Invert = 1;                       
int b_hold_ADS           =FALSE; // if Toggle ADS in use * / need to be reset
int b_ADS_Delay          =FALSE; // On /Off ADS Delay   
int JumpActive           =FALSE;                       
int InstantDrop          =FALSE; // Slide or instant drop
int b_switch;   
int NotReloading         = TRUE;   
int DblClick_JUMP;         
int TimeToJump;           
int LongJump             = TRUE
int b_running;                   
int b_tap ;                   // boolean variable 
int timerLJump;               
int wait_sec_tap = 200;               
 
int loop_slide;                         
int loop_g_slide;                         
//////////////////////////////////////////////////////////
//                         
int timer;                 
int Sens         =  0;   
int SlideOrDrop  =  20;   
int DelayScope   =  20;     
int ADS_Delay    =  0;// ADS delay value
//INITIALIZATION - init                       
//--------------------------------------------------------------
init {//#############################################     
    if(InvertYaxis) Invert = -1;                                                       
    if(InstantDrop)SlideOrDrop=20;                         
    else SlideOrDrop=10;                                   
}//##################################################     
//MAIN BLOCK RUTINES                                       
//--------------------------------------------------------------
main {  // Start of MAIN BLOCK                                 
//--------------------------------------------------------------
// FIND DIRECTION of Left Analogue                           
 if(get_val(L_X)<-20 || get_val(L_X)>20)LX=get_val(L_X);     
//--------------------------------------------------------------
   ////////////////////////////////////////////
/*   // Cancel conditions for loop slide           
      if(abs(get_val(L_Y))<20 || event_press(JUMP_BTN) || get_val(PRONE_BTN) || get_val(ADS_BTN)) loop_slide = FALSE;
 
 
 
   ////////////////////////////////////////////   
   //  loop slide                                 
   if(loop_slide) {                               
      if(abs(get_val(L_Y))>80 || abs(get_val(L_X))>70){
         combo_run(INFINITE_SLIDE);                       
      }else if(abs(get_val(L_Y))<20 && abs(get_val(L_X))<20){
         combo_stop(INFINITE_SLIDE);                 
         loop_slide = FALSE;                       
      }                       
   }               
   // INFINITE - SLIDE 
  if( get_val(L_Y)<-80 ){   
    if(get_val(SPRINT_BTN) && get_ptime(SPRINT_BTN)>=200 && !loop_slide) {
        loop_slide=TRUE;     
 
    }   
  }   
 
   ////////////////////////////////////////////
   // Cancel conditions for loop slide           
      if(abs(get_val(L_Y))<20 || event_press(JUMP_BTN) || get_val(PRONE_BTN) || get_val(ADS_BTN)) loop_g_slide = FALSE;
 
 
 
   ////////////////////////////////////////////   
   //  loop slide                                 
   if(loop_g_slide) {                               
      if(abs(get_val(L_Y))>70 || abs(get_val(L_X))>70){
         combo_run(G_SLIDE_2_0);                       
      }else if(abs(get_val(L_Y))<20 && abs(get_val(L_X))<20){
         combo_stop(G_SLIDE_2_0);                 
         loop_g_slide = FALSE;                       
      }                       
   }               
   // G - SLIDE 
  if( get_val(L_Y)<-80 ){   
    if(get_val(SPRINT_BTN) && get_ptime(SPRINT_BTN)>=200 && !loop_g_slide) {
        loop_g_slide=TRUE;     
 
    }   
  }   
*/

///////////////////////////////////////////////////////////////////
//    KILL STREAKS        /////////////////////////////////////////
///////////////////////////////////////////////////////////////////
 
      if(get_val(18)) {combo_run(KILLSTREAKS);}
///////////////////////////////////////////////////////////////////
//  AKIMBO        /////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
    if(rapid_onoff && akimbo_onoff && !get_val(ADS_BTN)){
        if(get_val(FIRE_BTN)) combo_run(RAPID_AKIMBO)
    }                                                 
    else if(akimbo_onoff) {                           
       if(get_val(FIRE_BTN) && !get_val(ADS_BTN)){   
          set_val(ADS_BTN,100);                     
       }                                         
    }                                         
      ///////////////////////////////////////////////
      // RUNNING OR STANDING STILL                   
      if(abs(get_val(11))>60 || abs(get_val(12))>80){
            b_running= TRUE;                           
      }else{                                           
            b_running=FALSE;                             
      }                                                   
 
//////////////////////////////////////////////////////////////////////////
//  RELOAD WITH SLIDE  ///////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
 
   // Reload with Slide                               
   if(b_running){//-----------------------           
       if(event_press(RELOAD_BTN)) {                 
           combo_run(DROPSHOT);                       
       }                                             
   }//------------------------------------           
 
      /////////////////////////////////////////////////
      //  DOUBLE MEELE                                 
      if(BurstMelee) {                         
          if(get_val(MELEE) ) { combo_run(BURST_MELEE); }
       }                                               
      /////////////////////////////////////////////////
      //  HOLD BREATH                                 
      if(hold_breath_On_Off) {                         
          if(get_val(ADS_BTN) || b_hold_ADS) { set_val(SPRINT_BTN,100); }
       }                                               
// Class 5 : SCOPE 
 
    // Class 5 : SCOPE  -  QUICK SCOPE MODE
 
     if(QuickScope){//--------------------- 
        if(event_release(ADS_BTN) && get_ptime(ADS_BTN)<=150){
            //combo_run(QUICK_SCOPE);               
        }                                       
     }//-------------------------------------- 
///////////////////////////////////////////////////////////////////////////
///////////        TOGGLE ADS                      ////////////////////////
///////////////////////////////////////////////////////////////////////////
    if(TogleADS) {                                           
        if(event_press(ADS_BTN)){                     
           b_hold_ADS = !b_hold_ADS;                 
        }                                             
   }                                                 
    // hold ADS                                       
    if(b_hold_ADS){                                   
        set_val(ADS_BTN,100);                         
    }                                                 
    if(event_press(RELOAD_BTN)){
         b_hold_ADS = FALSE;                   
      }                                               
    //--------------------------------------------------
    if(get_val(12)==(-100*Invert)) {                   
       if(event_press(SPRINT_BTN)) b_hold_ADS = FALSE;
 
    }                                               
///////////////////////////////////////////////////////////////////////////
///////////        ADS SENSITIVITY                 ////////////////////////
///////////////////////////////////////////////////////////////////////////
   // SENSITIVITY - if ADS Delay is ON                 
   if(get_val(ADS_BTN)|| b_hold_ADS)                   
   {//------------------------------------             
   if(timer>0 && b_ADS_Delay)timer=timer-get_rtime()
   else {//-----------------------------------         
          sensitivity(R_X, NOT_USE, 100 + Sens);       
          sensitivity(R_Y, NOT_USE, 100 + Sens);       
        }                                             
   }//------------------------------------             
   if(event_press(ADS_BTN))timer=ADS_Delay;         
//--------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////
///////////        AUTO SPRINT                     ////////////////////////
///////////////////////////////////////////////////////////////////////////
//  AUTO SPRINT START                                                     
   if (get_val(L_Y)<=-90 && NotReloading && !get_val(ADS_BTN)){ combo_run( AutoSprint); }
   else if(get_val(L_Y) > -90) { combo_stop( AutoSprint); }               
//  AUTO SPRINT END                                                       
//--------------------------------------------------------------           
 
 
///////////////////////////////////////////////////////////////////////////
///////////       SPECIAL ABILITY                  ////////////////////////
///////////////////////////////////////////////////////////////////////////
    if(SpecialAbility_OnOff) {                                             
 
        if(event_press(XB1_RS)) {
          Akimbo_Secondary=FALSE
          //combo_stop(SPECIAL_ABILITY);
          combo_run(RIPR);
          combo_run(BURST_MELEE);
 
          //rapid_onoff    = FALSE;                                         
          //PrimaryWeapon  = FALSE;                                         
          //SecondaryWeapon= FALSE;                                         
          b_switch=TRUE;                                                 
        }
        if (event_press(XB1_LB)){
          Akimbo_Secondary=FALSE
          combo_run(SPECIAL_ABILITY);                                         
          //rapid_onoff    = FALSE;                                         
          //PrimaryWeapon  = FALSE;                                         
          //SecondaryWeapon= FALSE;                                         
          b_switch=TRUE;
 
        }                                                                 
    }                                                             
///////////////////////////////////////////////////////////////////////////
////////   DROP SHOT On / Off  ////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
 /*                                                                         
  if (DblClick_JUMP>0)DblClick_JUMP=DblClick_JUMP- get_rtime();           
  //--------------------------------------------------------------         
  if (event_press(JUMP_BTN) && DblClick_JUMP<=0 ) {DblClick_JUMP=timelimit;}
  else if (event_press(JUMP_BTN)&& DblClick_JUMP>0 ){TimeToJump=1500;JumpActive=TRUE;}
  //--------------------------------------------------------------         
   if(JumpActive) {                                                         
                   TimeToJump=TimeToJump-get_rtime();   
                   if(TimeToJump<=0){JumpActive=FALSE;}
                  }                                     
   // DROP SHOT On / Off = CEMU_EXTRA1  + D pad Down     
   if(get_val(XB1_LT) && event_press(Down))   
     {//-----------------------------------             
         dropshot_OnOff=!dropshot_OnOff;               
         if(dropshot_OnOff){                           
          ScopeShot      =FALSE;                         
          JumpShot_OnOff =FALSE;                       
          //side_shot_OnOff=FALSE;                       
         }                                             
 
     }//-----------------------------------             
   // ------------------------------------------------------
 
 
   // DROP SHOT                                           
   //press fire btn without ADS for Drop Shot  JumpActive     
    if(  dropshot_OnOff && !get_val( ADS_BTN) && !JumpActive){
       if(get_val(FIRE_BTN) ) { combo_run(DROPSHOT);}       
    }
*/
   
 // DROP SHOT On / Off = CEMU_EXTRA1  + D pad Down     
   if(get_val(XB1_LT) && event_press(Down))   
     {//-----------------------------------             
         dropshot_OnOff=!dropshot_OnOff;               
         if(dropshot_OnOff){                           
          ScopeShot      =FALSE;                         
          JumpShot_OnOff =FALSE;                       
          //side_shot_OnOff=FALSE;                       
         }                                             
 
     }
// DROP SHOT                                           
   //press fire btn without ADS for Drop Shot
 
 
    if(  dropshot_OnOff && !get_val( ADS_BTN) ){
       if(event_press(FIRE_BTN) ) { combo_run(DROPSHOT);}       
}                                                                     
///////////////////////////////////////////////////////////////////////////
//  JUMP SHOT   ///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
 
 // Jump Shot  On / Off => CEMU_EXTRA1 + D pad Up             
  if(get_val(XB1_LT)&& event_press(Up))     
    {                                                 
     JumpShot_OnOff=!JumpShot_OnOff;                   
       if(JumpShot_OnOff){                             
          //ScopeShot      =FALSE;                         
          //side_shot_OnOff=FALSE;                       
          dropshot_OnOff =FALSE;                       
       }                                               
 
    }                                                 
  // Jump Shot Scope Enable                     
  if (JumpShot_OnOff )             
   {//-----------------------------------------       
    if(event_press(ADS_BTN) )combo_run(Jump);         
   }//-----------------------------------------       
 
//////////////////////////////////////////////////////////////////////////
//  SIDE SHOT   //////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
 
 // Side Shot  On / Off => CEMU_EXTRA1 + D pad Right     
/*  if(get_val(XB1_LT)&& event_press(Right))
    {                                                   
     side_shot_OnOff=!side_shot_OnOff;                 
       if(side_shot_OnOff){                             
          ScopeShot      =FALSE;                         
          JumpShot_OnOff =FALSE;                         
          dropshot_OnOff =FALSE;                       
       }                                               
 
    }                                                   
 
 
  // Side Shot Scope Disable                                                     
  if (side_shot_OnOff && !get_val(ADS_BTN))             
   {//-----------------------------------------         
    if(event_press(FIRE_BTN) )combo_run(SIDE_SHOT);     
   }//-----------------------------------------         
 
*/
                                                               
//////////////////////////////////////////////////////////////////////////
//  SCOPE SHOT   /////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
 //Scope Shot  On / Off => CEMU_EXTRA1 + D pad Left     
  if(get_val(XB1_LT)&& event_press(Left))
    {                                                   
     ScopeShot=!ScopeShot;                 
       if(ScopeShot){                             
          JumpShot_OnOff =FALSE;                         
          //side_shot_OnOff=FALSE;                         
          dropshot_OnOff =FALSE;                       
       }                                               
 
    }                                                   
   if(ScopeShot) {                                       
      if(get_val(FIRE_BTN) && !get_val(ADS_BTN)) {                           
          set_val(ADS_BTN,100);                         
      }                                                 
   }                                                     
//////////////////////////////////////////////////////////////////////////
//  RAPID FIRE Primary - Secondary  //////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
 
   if(Prim_SecondWeapon){                             
 
      if(get_val(RELOAD_BTN) && get_ptime(RELOAD_BTN)>=150) {                   
          PrimaryWeapon = TRUE;             
          SecondaryWeapon= FALSE;           
          combo_run(NOTIFY_ON);   
          b_switch=FALSE;                                           
      }                                               
      ///////////////////////////////////////////////////////////////////////
      // turn RF OFF if switch to special weapon/ Ability                 
 
      if(get_val(TACTICAL) && get_val(LETHAL) && !b_switch){             
          PrimaryWeapon = FALSE;                                   
          SecondaryWeapon= FALSE;           
          b_switch=TRUE;                                           
      }                                                             
 
       if(event_press(SWITCH_WEAPON)) {               
          PrimaryWeapon = !PrimaryWeapon;             
          SecondaryWeapon= !SecondaryWeapon;           
       }                                               
 
 
      ////////////////////////////////////////////////////////////
      // Rapid Fire Primary weapon                               
      if(PrimaryWeapon){//----------------------------------------
 
 
 
         if(get_val(FIRE_BTN)  && !burst_onoff ) {   
            combo_run(RAPID_FIRE_Primary);             
         }else if(combo_running(RAPID_FIRE_Primary)){ 
            combo_stop(RAPID_FIRE_Primary);           
         }                                             
       }//--------------------------------------------------------
 
       ////////////////////////////////////////////////////////////
       // Rapid Fire Secondary weapon                             
       if(SecondaryWeapon){//----------------------------------------
 
 
           if(get_val(FIRE_BTN)  && !burst_onoff ) { 
             combo_run(RAPID_FIRE_Secondary);           
           }else if(combo_running(RAPID_FIRE_Secondary)){
             combo_stop(RAPID_FIRE_Secondary);           
           }                                             
       }//--------------------------------------------------------
   }// Prim_SecondWeapon                                   
//--------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////
//  LONG JUMP    /////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
 
  //////////////////////////////////////////////////
  // LONG JUMP                                                             
  if(get_val(JUMP_BTN)){                                                         
     if(event_press(Up)) {                                           
         LongJump =!LongJump;// ON / OFF Long Jump                         
      }                                                                   
    set_val(Up,   0):                                                     
 
  }                                                                       
 
        /////////////////////////////////////////////                     
        // timer for second tap                                           
         if(timerLJump>0) {//---------------------                         
              timerLJump= timerLJump -get_rtime();                         
             if(timerLJump <= 0) b_tap=FALSE;                             
         }//--------------------------------------                         
 
 
 
 
  if(LongJump ){                                                             
  //-----------------------------------------------------------   Long Jump   ------------
      /////////////////////////////////////////////////                   
      // First tap                                                         
      if (event_press(JUMP_BTN) && !b_tap) {                               
                b_tap=TRUE;                                               
                timerLJump = wait_sec_tap;                                 
      // Second tap                                                       
      }else if (event_press(JUMP_BTN) && b_tap ){                         
               TimeToJump=1500;                                           
               JumpActive=TRUE;                                           
               b_tap=FALSE;                                               
               combo_run (LONG_JUMP_HIMSELF);                             
      }                                                                   
      /////////////////////////////////////////////////                   
  //-----------------------------------------------------------           
  }                                                                         
  ///////////////////////////////////////////////////----        Long Jump   ------------
 
/////////////////////////////////////////////////////////
//  AIM ASSIST  all credits go to the author : x22dot                                         
/////////////////////////////////////////////////////////
 
    if(get_val(XB1_A)) {
         if(event_press(XB1_X)) aim_assist_on = !aim_assist_on;
         if(aim_assist_on) combo_run(NOTIFY_ON)
         else combo_run(NOTIFY_OFF);             
    }                                                             
 
 
   if(aim_assist_on){//---------------------------------------------
 
        if(get_val(ADS_BTN) || b_hold_ADS) {                                   
            combo_run(LT_C);
            //combo_stop(XT_C);
        }
 
        if(get_val(FIRE_BTN) /*&& (get_val(ADS_BTN)||b_hold_ADS)*/) {               
            //combo_stop(XT_C);
            combo_stop(LT_C);                                     
            combo_run(RT_C);
        }                                                         
 
        if(get_val(R_X) < value2 || get_val(R_X) > value || get_val(R_Y) < value2 || get_val(R_Y) > value || get_val(R_X) < value2 || get_val(R_X) > value || get_val(R_Y) < value2 || get_val(R_Y) > value) { 
            combo_stop(LT_C);                                         
            combo_stop(RT_C);
            //combo_stop(XT_C);
        }                                                             
   }//--------------------------------------------------------------
 
}// End of MAIN BLOCK                                           
//--------------------------------------------------------------
 
///////////////////////////////////////////////////////////////////////////
//COMBO BLOCKS   //////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
combo NOTIFY_ON {           
   set_rumble(RUMBLE_A,5);//100
   wait(300);               
   reset_rumble();         
   }                       
 
combo NOTIFY_OFF {         
   set_rumble(RUMBLE_B,5);//100
   wait(300);               
   reset_rumble();         
   }                     
/*                       
combo G_SLIDE_2_0  {     
   set_val(PRONE_BTN,100);
   wait(300);           
   set_val(MELEE,100); 
   wait(50);             
   wait(500);             
   set_val(JUMP_BTN,100);
   wait(50);           
   wait(150);         
}*/
                     
// Sensitivity 5 - 14
combo LT_C {         
   set_val(R_Y,-25)
   wait(delay)       
   set_val(R_X, 25);
   set_val(R_Y, 15)
   wait(delay)       
   set_val(R_Y, 15)
   wait(delay)       
   set_val(R_X,-25);
   set_val(R_Y, 15)
   wait(delay)     
}                   
 
combo RT_C {       
   set_val(R_Y,-35);
   wait(delay)
   set_val(R_X,35);
    //set_val(L_X,100);
   set_val(R_Y, 25);
   wait(delay)
   set_val(R_Y, 25);
   wait(delay)
   set_val(R_X,-35);
   // set_val(L_X,100);
   set_val(R_Y, 25);
   wait(delay)
 
 
}
combo XT_C {       
   set_val(R_Y,-17);
   wait(delay)     
   set_val(R_X, 17);
   set_val(R_Y, 17);
   wait(delay)     
   set_val(R_Y, -27);
   wait(delay)     
   set_val(R_X,27);
   set_val(R_Y, 17);
   wait(delay)     
}
combo KILLSTREAKS{
   set_val(16,100);
   wait(10);
   set_val(16,0);
   }
/*combo INFINITE_SLIDE{       
    set_val(JUMP_BTN, 100);
    wait(30);               
    set_val(JUMP_BTN, 0);   
    wait(450);             
    set_val(PRONE_BTN, 100);
    wait(300);             
    set_val(PRONE_BTN, 0);
    wait(250);         
}*/
                     
combo Jump {     
   set_val(JUMP_BTN,100);//1 
   wait(60);                 
   wait(80);                 
   set_val(JUMP_BTN,100);//1 
   wait(600);                 
}             
combo RAPID_AKIMBO {     
   set_val(FIRE_BTN,100);
   set_val( ADS_BTN,100);
   wait(hold_timeA);     
   set_val( ADS_BTN,0);   
   set_val(FIRE_BTN,0);   
   wait(rest_timeA);     
   set_val( ADS_BTN,0);   
   set_val(FIRE_BTN,0);   
   wait(rest_timeA);     
}                         
combo LONG_JUMP_HIMSELF {     
   set_val(JUMP_BTN,100);//1 
   wait(100);                 
   set_val(JUMP_BTN,  0);     
   wait(80);                 
   set_val(JUMP_BTN,100);//2 
   wait(100);                 
   set_val(JUMP_BTN,  0);     
   wait(80);                 
   set_val(JUMP_BTN,100);//3 
   wait(100);                 
   set_val(JUMP_BTN,  0);     
   wait(100);                 
   set_val(JUMP_BTN,100);//4 
   wait(50);                 
   set_val(JUMP_BTN,  0);     
   wait(80);                 
   set_val(JUMP_BTN,100);//5 
   wait(100);                 
   set_val(JUMP_BTN,  0);     
   wait( 80);                 
}                             
combo TAKE_SHOT {   
    set_val(FIRE_BTN,100);
    set_val(ADS_BTN, 100);
    set_val(SPRINT_BTN,100);
    wait(100);       
}
 
combo BURST_MELEE{   
   set_val(MELEE, 0);   
   set_val(FIRE_BTN, 100);
   wait(50);             
   wait(400);           
   set_val(MELEE, 100);
   wait(50);           
   wait(400);     
}         
 
// Quick Scope - Class 5 
/*combo QUICK_SCOPE {       
    set_val(FIRE_BTN,0);
    set_val(SPRINT_BTN,100);
    set_val(ADS_BTN,100);
    wait(200);
    set_val(SPRINT_BTN,100);
    set_val(ADS_BTN,100);
    set_val(FIRE_BTN, 100);
    wait(50);
}   
*/
                           
combo RIPR {                     
    set_val(LETHAL,100);                   
    set_val(TACTICAL,100);
    wait(100);                           
}                                           
combo SPECIAL_ABILITY {                     
    set_val(LETHAL,100);                   
    set_val(TACTICAL,100);
    wait(100);
 
    //set_val(FIRE_BTN,100);
    //set_val(ADS_BTN,100);
   // wait(900);                             
}                                           
 
combo RAPID_FIRE_Primary {                 
   set_val(FIRE_BTN,100);                   
   wait(hold_timeP);                         
   set_val(FIRE_BTN,0);                     
   wait(rest_time);                         
   set_val(FIRE_BTN,0);                     
   wait(rest_timeP);                         
}                                           
combo RAPID_FIRE_Secondary {               
   set_val(FIRE_BTN,100);                   
   wait(hold_timeS);                         
   set_val(FIRE_BTN,0);                     
   wait(rest_timeS);                       
   set_val(FIRE_BTN,0);                     
   wait(rest_timeS);                       
}                                             
combo AutoSprint {                         
   set_val(SPRINT_BTN,100);                 
   wait(10); // hold Sprint btn.           
   set_val(SPRINT_BTN,100);                 
}                                           
 //DROP SHOT                               
combo DROPSHOT {//begin                     
   if(InstantDrop){set_val( L_Y,0);}       
   wait(SlideOrDrop);                       
   set_val(PRONE_BTN, 100);               
   wait(dropDelay); //Time To Go Prone     
}//end                                     
 
//combo SIDE_SHOT {                         
   //set_val(L_X, 100);                     
   //wait(400); // -----------------         
   //set_val(L_X,-100);                     
   //wait(400); // -----------------         
//}                                         
 
// end of script                                                                   
User avatar
Syndicate HD
Staff Sergeant
Staff Sergeant
 
Posts: 12
Joined: Thu Oct 04, 2018 4:26 pm

Re: Convert Titan1 scripts to Titan2 the easy way

Postby Scachi » Mon Oct 08, 2018 5:41 pm

I have added a section "Summary - How to convert T1/CM scripts" to the very first post of this thread with the basic steps to do for those who just want to know the basic steps.
Read the few lines written there plus the first error below that about the typical GPC errors and you should have no trouble converting it.

Your posted script only requires that one additional line to add top the top of the script and add missing ; above the line the double click on the error message will direct you.
Repeat the compile & double click & one line up, at ; to the end until no more error are reported and you are done.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Convert Titan1 scripts to Titan2 the easy way

Postby Syndicate HD » Tue Oct 09, 2018 2:34 pm

Thanks Scachi for the help.

I followed your directions with the code I posted and it appears everything compiled fine except one error that I can't seem
to fix.

Code: Select all
///////////////////////////////////////////////////////////////////////////
///////////       SPECIAL ABILITY                  ////////////////////////
///////////////////////////////////////////////////////////////////////////
    if(SpecialAbility_OnOff) {                                             
 
        if(event_press(XB1_RS)) {
          Akimbo_Secondary=FALSE
          //combo_stop(SPECIAL_ABILITY);
          combo_run (cRIPR);
          combo_run(BURST_MELEE);
 
          //rapid_onoff    = FALSE;                                         
          //PrimaryWeapon  = FALSE;                                         
          //SecondaryWeapon= FALSE;                                         
          b_switch=TRUE;                                                 
        }
        if (event_press(XB1_LB)){
          Akimbo_Secondary=FALSE
          combo_run(SPECIAL_ABILITY);                                         
          //rapid_onoff    = FALSE;                                         
          //PrimaryWeapon  = FALSE;                                         
          //SecondaryWeapon= FALSE;                                         
          b_switch=TRUE;
 
        }                                                                 
    }     


Code: Select all
combo (cRIPR) {                     
    set_val(LETHAL,100);                   
    set_val(TACTICAL,100);
    wait(100);                           
}


The error I am getting is the following:
GPC: Second-pass started.
GPC error: bo3-TITAN.gpc(335): syntax error, unexpected COMBORUN, expecting C 'combo_run'.
GPC: GPC Compile ABORTED with 0 warning(s) and 1 error(s).


The original code had just RIPR as the name of the combo but you wrote sometimes you have to add the letter "c" to the combo name then compile. I did that as you can see but still get the error.

Any idea why?

Also, the code posted above is after the "c" was added.
User avatar
Syndicate HD
Staff Sergeant
Staff Sergeant
 
Posts: 12
Joined: Thu Oct 04, 2018 4:26 pm

Re: Convert Titan1 scripts to Titan2 the easy way

Postby Scachi » Tue Oct 09, 2018 3:19 pm

You don't need add the c to the combo. This is only needed on "invalid symbol redefinition" error with combo name used as variable at the same time.

The line "Akimbo_Secondary=FALSE" is only missing a ; , that's it why it struggles with the combo command as it doesn't expect this.
The problem with missing ; or mistyped as : is that they are hard to spot sometimes. But that is the most common error to lookout for.

I send you a PM.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

PreviousNext

Return to Tutorials and FAQs

Who is online

Users browsing this forum: No registered users and 21 guests