// --------------------------------------------------------------------------------- // Advanced Mouse-Controlled Primary, Secondary, and Melee Script for Scout // created by Sveniven // This Script allows the user to select, and fire their primary, secondary, or melee weapon // By pressing mouse1, mouse2, or mouse 3 (scroll wheel click) respectively. // // This script allows for each of the mouse buttons to null-cancel properly, // while accounting for buttons that are still held down throughout a quick-switch // --------------------------------------------------------------------------------- // // INSTALLATION: // // (Note that if you are using mastercomfig, the following should be done in the "tf/cfg/user" folder) // If you want to put the script in the user folder, Step 4 should be: exec user/mouse_prim_sec_melee.cfg // // 1. Navigate to your Team Fortress 2 root directory // // 2. Place this entire file within your "tf/cfg/" folder, (or copy-and paste the script below, after the commented hyphenated line into a file named mouse_prim_sec_melee.cfg) // // 3. If you don't have class-specific configs set-up, you can see how to do that here: https://www.reddit.com/r/tf2scripthelp/wiki/introduction#wiki_using_scripts // (You will need to set-up config files for each class, and implement the reset.cfg) // // 4. Inside your scout.cfg add the following line (without the comment character: //): // This will execute the script when you switch your class to scout. // // exec mouse_prim_sec_melee.cfg // // 5. Inside your reset.cfg (or whatever you named it), add the following lines, and remove the comment character: //): // This will rebind your mouse buttons after switching your class back. // // bind MOUSE1 +attack // bind MOUSE2 +attack2 // bind MOUSE3 +attack3 // bind "1" slot1 // bind "2" slot2 // bind "3" slot3 // // NOTE: // This script is intended for use with Scout, and will not work for weapons with an alt-fire (+attack2) bound to right-click. // You will need a different bind for +attack2 if you wish to use this script with such weapons // This includes the Shortstop's push mechanic, and the Soda-Popper's hype meter // // When drawing your melee, alt-fire is automatically held down, so that the Wrap-Assasin / The Sandman // can still fire a ball. // --------------------------------------------------------- bind "1" "" bind "2" "" bind "3" "" // Remove the 3 commands above if you still wish to use your number keys to switch weapons // This only causes one minor issue, but the script should still be functional bind "MOUSE1" "+scattergun" bind "MOUSE2" "+pistol" bind "MOUSE3" "+melee" alias "+scattergun" "slot1; +attack; alias checkScatter scatterOn" alias "-scattergun" "-attack; checkPistol; checkMelee; alias checkScatter" alias "+pistol" "slot2; +attack; alias checkPistol pistolOn" alias "-pistol" "-attack; checkScatter; checkMelee; alias checkPistol" alias "+melee" "slot3; +attack; +attack2; alias checkMelee meleeOn" alias "-melee" "-attack; -attack2; checkScatter; checkPistol; alias checkMelee" alias "checkScatter" "" alias "checkPistol" "" alias "checkMelee" "" alias "scatterOn" "+attack; slot1" alias "pistolOn" "+attack; slot2" alias "meleeOn" "+attack; slot3"