This script for the t1 can it be converted to work for t2

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

This script for the t1 can it be converted to work for t2

Postby DUCKMO3W » Thu Mar 15, 2018 4:21 am

I found this script on the console tuner website and its for the titan one but i need it to work for the titan two can anyone convert this to work for titan two heres the script.. I tryd to paste it in a blank gpc script but it says this "GPC: GPC Build ABORTED with 0 warning(s) and 1 error(s)."


define RT = XB360_RT;
define YBUTTON = XB360_Y;

define RATE_OF_FIRE = 33; // This is the rate that the Y button is pressed. It is x ammount of times per second

// No need to change anything else

int hold_time, rest_time;

init {
hold_time = 500 / RATE_OF_FIRE;
rest_time = hold_time - 20;
if(rest_time < 0) rest_time = 0;
}

main {
if(get_val(RT)) {
combo_run(Jitter);
} else if(combo_running(Jitter)) {
combo_stop(Jitter);
}
}

combo Jitter {
set_val(YBUTTON, 100);
wait(hold_time);
set_val(YBUTTON, 0);
wait(rest_time);
set_val(YBUTTON, 0);
}
User avatar
DUCKMO3W
Sergeant First Class
Sergeant First Class
 
Posts: 22
Joined: Sat Jan 10, 2015 9:29 pm

Re: This script for the t1 can it be converted to work for t

Postby DUCKMO3W » Thu Mar 15, 2018 5:37 am

well i found this on another topic that was asking the same thing i just did and it workd for me, so noneed to reply unless anyone really wants to.
User avatar
DUCKMO3W
Sergeant First Class
Sergeant First Class
 
Posts: 22
Joined: Sat Jan 10, 2015 9:29 pm

Re: This script for the t1 can it be converted to work for t

Postby J2Kbr » Thu Mar 15, 2018 10:12 am

To use Titan One script on the Titan Two just add the back compatibility header file at the beginning of the code, example:
Code: Select all
#include <titanone.gph>
 
define RT = XB360_RT;
define YBUTTON = XB360_Y;
 
define RATE_OF_FIRE = 33; // This is the rate that the Y button is pressed. It is x ammount of times per second
 
// No need to change anything else
 
int hold_time, rest_time;
 
init {
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
}
 
main {
    if(get_val(RT)) {
        combo_run(Jitter);
    } else if(combo_running(Jitter)) {
        combo_stop(Jitter);
    }
}
 
combo Jitter {
    set_val(YBUTTON, 100);
    wait(hold_time);
    set_val(YBUTTON, 0);
    wait(rest_time);
    set_val(YBUTTON, 0);
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 105 guests