Basic GPC Scripting
4 posts
• Page 1 of 1
Basic GPC Scripting
Below is a simple script that combines a few common tools many will use often. I've tried to comment what I've done so anyone can replicate or adapt bits of this script for themselves. If anyone wants me to explain it more, please ask.
- Code: Select all
// Basic Turbo Tutorial Script
define speed=80; // This number denotes both how long the button is held as well as how long of a pause is in-between button presses.
// Larger numbers slow the speed of turbo whereas smaller numbers increase the speed.
define button=4; // 4 is the identifier for the RT on the XB1 and 360 and R2 on the PS3/4. Auto-fire of a weapon makes things easier,
// and this is the most common button used to fire. For a complete list of identifiers see section 12 (bottom):
// http://goo.gl/sQ2lcg
int loop; // Initialize keyword for our switch to turn this script on and off at will.
main {
if (event_press(8)) {loop=!loop;} // Press LS/L3 (identifier 8) to enable/disable this combo.
if (loop) {combo_run(switch);} // If the loop is active, run the combo 'switch'.
if (!loop) {combo_stop(switch);} // If the loop is inactive, stop combo.
// Since this command resides in the MAIN area of the script, it is always running.
// You can start and stop this at will by pressing LS/L3.
}
combo switch {
if (get_val(button)) {combo_run (turbofire);} // This runs the combo whenever the button (RT/R2 in this case) is pressed.
}
combo turbofire { // Turbofire combo
set_val(button,100); // This tells the Titan One to press the button.
wait (speed); // This tells the Titan One to wait the amount of milliseconds defined by speed above.
set_val(button,0); // This tells the Titan One to release the button.
wait (speed); // ... and one more wait to pause between button presses
}
Last edited by Sitava on Mon Aug 04, 2014 9:27 pm, edited 1 time in total.
-
Sitava - Corporal
- Posts: 5
- Joined: Sat Jul 19, 2014 9:41 am
Re: Basic GPC Scripting
Very useful, thanks for the tut. 

-
HardcoreGamer - Command Sergeant Major
- Posts: 117
- Joined: Sun Aug 03, 2014 9:28 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests