Converting cm to titan two

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

Converting cm to titan two

Postby taecarter55 » Sun Dec 09, 2018 9:02 am

ive read everything there is yet I still cannot get this script to convert at all no matter what I do. I really dislike gcp2
Code: Select all
#pragma METAINFO("<author_name>", 1, 0, "")
#include <titanone.gph>
//--Aim Assist
    //--constants
    #define AA_P        26;      //--ads values
    #define AA_N       -26;
    #define FA_P        42;      //--firing values
    #define FA_N       -42;
    #define AA_DELAY    20;       //--delay between values
    //--variables
    int release       AA_P + 1//--aim assist release
    int aa_p,aa_n;
 
 
    #define AR_Y      =  25       //--anti recoil value
 
 
main {
 
     //--ads 
    if(get_val(7) && !get_val(4)) {
        //--aim assist ads values
        aa_p = AA_P; aa_n = AA_N;
        release = aa_p + 1;
        //--aim assist 
        combo_run(AA_XY);
    }
 
    //--firing 
    if(get_val(4)) {
        //--aim assist firing values
        aa_p = FA_P; aa_n = FA_N; release = aa_p + 1;
        //--aim assist 
        combo_run(AA_XY)
    }
}
combo AA_XY {
   //--anti recoil instead of aim assist if firing
   if(!get_val(4))set_val(10,xy_val(10,aa_p));
        else set_val(10,xy_val(10,AR_Y))
    wait(AA_DELAY)
    set_val(9,xy_val(9,aa_p));
    wait(AA_DELAY)
    //--anti recoil instead of aim assist if firing
    if(!get_val(4))set_val(10,xy_val(10,aa_n));
        else set_val(10,xy_val(10,AR_Y))
    wait(AA_DELAY)
    set_val(9,xy_val(9,aa_n));
    wait(AA_DELAY)
}
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}]
User avatar
taecarter55
Private
Private
 
Posts: 1
Joined: Sun Dec 09, 2018 8:33 am

Re: Converting cm to titan two

Postby Scachi » Sun Dec 09, 2018 9:25 am

It looks like you tried to use the titanone.gph header file and tried to convert the script to the gpc2.
If you use the header files don't changes the 'define' or other things to Titan Two/gpc, just fix error like missing ; and similar things.
Use the header file, or convert all the commands/syntax to gpc2.

Code: Select all
#include <titanone.gph>
 
#define wait(a) wait(a);
 
//--Aim Assist
//--constants
define AA_P = 26; //--ads values
define AA_N = -26;
define FA_P = 42; //--firing values
define FA_N = -42;
define AA_DELAY = 20; //--delay between values
//--variables
int release;// = AA_P + 1; //--aim assist release
int aa_p,aa_n;
 
 
define AR_Y = 25; //--anti recoil value
 
init {
  release = AA_P + 1; //--aim assist release
}
 
main {
 
//--ads
if(get_val(7) && !get_val(4)) {
//--aim assist ads values
aa_p = AA_P; aa_n = AA_N;
release = aa_p + 1;
//--aim assist
combo_run(AA_XY);
}
 
//--firing
if(get_val(4)) {
//--aim assist firing values
aa_p = FA_P; aa_n = FA_N; release = aa_p + 1;
//--aim assist
combo_run(AA_XY);
}
}
combo AA_XY {
//--anti recoil instead of aim assist if firing
if(!get_val(4))set_val(10,xy_val(10,aa_p));
else set_val(10,xy_val(10,AR_Y));
wait(AA_DELAY)
set_val(9,xy_val(9,aa_p));
wait(AA_DELAY)
//--anti recoil instead of aim assist if firing
if(!get_val(4))set_val(10,xy_val(10,aa_n));
else set_val(10,xy_val(10,AR_Y));
wait(AA_DELAY)
set_val(9,xy_val(9,aa_n));
wait(AA_DELAY)
}
function xy_val(f_axis,f_val) {
if(abs(get_val(f_axis)) < release)
return f_val;
return get_val(f_axis);
}
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 192 guests