titan 2 scripts
9 posts
• Page 1 of 1
titan 2 scripts
i'm not exactly sure where to put this or what the correct question is.
I have a script that works on the cronos, can this be made to work on titan 2?
also is there a tutorial for writing scripts for the titan 2? ill post the script I want to use below.
I have a script that works on the cronos, can this be made to work on titan 2?
also is there a tutorial for writing scripts for the titan 2? ill post the script I want to use below.
- Code: Select all
/*
*Press Right thumbstick to activate/Deactivate
*/
int MENUSPAM;
main {
vm_tctrl(+24); // 34ms update time}
if(event_press(XB1_RS)) {
MENUSPAM = !MENUSPAM
}
if(MENUSPAM)
combo_run(menuSpam);
}
combo menuSpam {
set_val(XB1_MENU,150);
//set_val(XB1_MENU,0);
wait(200);
set_val(XB1_VIEW,150);
// set_val(XB1_VIEW,0);
}
-
Lurkin - Sergeant
- Posts: 7
- Joined: Mon May 20, 2019 5:52 pm
Re: titan 2 scripts
- Code: Select all
#include <titanone.gph>
int MENUSPAM;
main {
vm_tctrl(+24); // 34ms update time}
if(event_press(XB1_RS)) {
MENUSPAM = !MENUSPAM;
}
if(MENUSPAM) combo_run(menuSpam);
}
combo menuSpam {
set_val(XB1_MENU,150);
//set_val(XB1_MENU,0);
wait(200);
set_val(XB1_VIEW,150);
// set_val(XB1_VIEW,0);
}
-
DontAtMe - Captain
- Posts: 502
- Joined: Tue Oct 02, 2018 4:49 am
Re: titan 2 scripts
when I convert this the timing is way to slow. are the times different for the t2?
-
Lurkin - Sergeant
- Posts: 7
- Joined: Mon May 20, 2019 5:52 pm
Re: titan 2 scripts
can someone explain step by step what is going on in this script? all I need to happen is when I press the right stick it starts spamming view and menu buttons until I press the right stick again.
-
Lurkin - Sergeant
- Posts: 7
- Joined: Mon May 20, 2019 5:52 pm
Re: titan 2 scripts
perfect. what I've been trying to figure out is if some of this is even necessary.
int MENUSPAM;<--------------what does this mean?
main {
vm_tctrl(+24); // 34ms update time} ;<--------------what does this mean?
if(event_press(XB1_RS)) {
MENUSPAM = !MENUSPAM; ;<--------------what does this mean?
}
if(MENUSPAM) combo_run(menuSpam);
int MENUSPAM;<--------------what does this mean?
main {
vm_tctrl(+24); // 34ms update time} ;<--------------what does this mean?
if(event_press(XB1_RS)) {
MENUSPAM = !MENUSPAM; ;<--------------what does this mean?
}
if(MENUSPAM) combo_run(menuSpam);
-
Lurkin - Sergeant
- Posts: 7
- Joined: Mon May 20, 2019 5:52 pm
Re: titan 2 scripts
Lurkin wrote:int MENUSPAM;<--------------what does this mean?
Variable declaration. The variable name can be anything, here it was called "MENUSPAM";
Lurkin wrote:vm_tctrl(+24); // 34ms update time} ;<--------------what does this mean?
Here the author is configuring the script to run once every 34 milliseconds (the default for this device is 10ms), this is being done possible to match the game FPS. The Titan Two run at 1ms or less and this command has no effect when executed on the Titan Two.
Lurkin wrote:MENUSPAM = !MENUSPAM; ;<--------------what does this mean?
The variable "MENUSPAM " is being used as toggle to enable/disable the execution of some mod.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: titan 2 scripts
I think he was referring to the ; semicolons at the end of each statement.
These are called statement terminators.
To make it short, Yes, they are all necessary as it lets the compiler know when each statement is finished.
These are called statement terminators.
To make it short, Yes, they are all necessary as it lets the compiler know when each statement is finished.
-
DontAtMe - Captain
- Posts: 502
- Joined: Tue Oct 02, 2018 4:49 am
9 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 142 guests