// FILE: z0dd_cg.cs // VERSION: 1.3 // DATE: 1/13/2001 // AUTHOR: Paul "z0dd" Paella // EMAIL: z0dd@adelphia.net // WEBPAGE: http://home.adelphia.net/~z0dd/ // // // VERSION HISTORY: // 1.3 - Changed the script messages to print in the bottom middle // of the screen instead of bottom left. // // 1.2 - Cleaned up the centerprint messaging code // // 1.1 - Fixed (I think) all problems with weapons firing // after you let go of fire button. // // WARNINGS: // This script is for those who are already adept with // the chaingun. You can only benefit from this script // if you already possess elite CG skills. Don't fool // yourself. If you think you're going to go from an // average chaingunner to an elite master you're in // for a big surprise. You will suck even more than you // did before you used this script. // // This script is unsupported. Sorry, I will NOT offer // any help getting this script to work or assisting you // in tweaking it for your computer. I'm still unsure // whether or not this script is worth using. That's for // you to decide. // // DESCRIPTION: // Fires the chaingun in short bursts. It's believed the // chaingun fires a narrower cone of bullets during first // few moments of firing. This script makes the CG fire // successive rounds of these narrow bursts. // From my observations, this script makes hitting someone // with the CG more difficult, but when you hit you do a // lot more damage. // // INSTALLATION: // Put z0dd_cg.cs into your: // ...\tribes\config // directory and insert this line into your autoexec.cs: // exec("z0dd_cg.cs"); // // This script is configured by editing the area labeled: // USER CONFIGURATION SECTION // // DEAFULT KEYS: // 1) The default fire key is set to mouse button 1. // 2) The default off/on toggle is set to CONTROL+c // // Do not edit the following line EditActionMap("playMap.sae"); ////////////////////////////////////////////////////////////////////////////// //////////////////////// USER CONFIGURATION SECTION ////////////////////////// ////////////////////////////////////////////////////////////////////////////// // // ---------------------------------- Fire Key ------------------------------- // // The key you use to fire your weapons. // The default is bound to the first mouse button bindCommand(mouse0, make, button0, TO, "z0ddcg::startShooting();"); bindCommand(mouse0, break, button0, TO, "z0ddcg::halt_shooting();"); // The key to toggle cg repeater off and on // The default is bound to the first mouse button bindCommand(keyboard0, make, control, "c", TO, "z0ddcg::ToggleCG();"); bindCommand(keyboard0, break, control, "c", TO, ""); // ------------------------------ Fire duration ------------------------------ // // The time (in seconds) each burst fires. // I don't advise changing this number $z0ddcg::fireDuration = 0.3; // ---------------------------- Fire pause delay ---------------------------- // // The time (in seconds) the CG doesn't fire between bursts. // I don't advise changing this number $z0ddcg::pauseDelay = 0.1; ////////////////////////////////////////////////////////////////////////////// ///////////////////// END OF USER CONFIGURATION SECTION ////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // SCRIPT SECTION. DON'T EDIT PAST THIS LINE UNLESS YOU WHAT YOU'RE DOING // ////////////////////////////////////////////////////////////////////////////// $z0ddcg::CGon = 1; $z0ddcg::shootingNow = 1; ///////////////////////////////////////////////////////////////////////////////////////// // controls how long msgs are displayed ///////////////////////////////////////////////////////////////////////////////////////// function z0ddcg::TurnOffCP() { $z0dd::CenterPrintCounter--; if(!$z0dd::CenterPrintCounter) Client::centerPrint("", 1); } function z0ddcg::ToggleCG() { if($z0ddcg::CGon) { $z0ddcg::CGon = 0; Client::centerPrint("CG Repeater OFF", 1); } else { $z0ddcg::CGon = 1; Client::centerPrint("CG Repeater ON", 1); } $z0dd::CenterPrintCounter++; schedule("z0ddcg::TurnOffCP();", 2); } function z0ddcg::shoot_cg() { if($z0ddcg::shootingNow) { postAction(2048, IDACTION_FIRE1, 1); // if the player is holding the CG if (getMountedItem(0) == 13) schedule("z0ddcg::pauseShooting();", $z0ddcg::fireDuration); } } function z0ddcg::startShooting() { $z0ddcg::shootingNow = 1; if($z0ddcg::CGon) z0ddcg::shoot_cg(); else postAction(2048, IDACTION_FIRE1, 1); } function z0ddcg::halt_shooting() { if($z0ddcg::CGon) { $z0ddcg::shootingNow = 0; postAction(2048, IDACTION_BREAK1, -0); } else postAction(2048, IDACTION_BREAK1, -0); } function z0ddcg::pauseShooting() { postAction(2048, IDACTION_BREAK1, -0); schedule("z0ddcg::shoot_cg();", $z0ddcg::pauseDelay); }