The unbindall command will remove all binds from all keys, as in unbindall This is useful at the start of config files to remove unwanted binds The echo command will display a string in your console. For example, echo "The config file has executed." You can bind a key to a function, as in bind 1 "use Blaster" However, you can also bind 2+ functions to a single key, delimited with semicolons, as in bind 5 "use Grenades; use Grenade Launcher" bind e "use Grenade Launcher; use Rocket Launcher; use BFG10K" Quake II will use the items in right-to-left order. In other words, if you press "e", the BFG10K will be used; but if you don't have it (or enough cells!) the rocket launcher will be used. If you don't have that, the grenade launcher will be used. The wait command causes Quake II to pause execution of a string of commands for a short time, as in bind g "say hum-de-dee-dum; wait; wait; say *YAWN*; wait; wait; say Zzzzzzzzzz." Pressing g will cause Quake II to say the strings with pauses between each one. Honestly, I don't use this. The alias function works almost the same as a bind. It can be set to a sequence of commands just like a bind, and then it can be used as a bind. Aliases are also delimited with semicolons. For example, alias useExplosiveWeapons "use Grenade Launcher; use Rocket Launcher" bind q "useExplosiveWeapons" alias useRG "use Railgun; crosshair 13" bind 9 "useRG" Thus, the "q" key is set to use the rocket launcher, and, if no rocket launcher, then use the grenade launcher. Pressing 9 will cause you to use the railgun and change your crosshair to whatever ch13.pcx happens to be (make sure it exists or Quake II will get really confused and flood your console with "cannot find file "pics/ch13.pcx!""). Aliases can also be set to other aliases, as in alias dropBFG "drop BFG10K" alias dropWeapon "dropBFG; say_team Here you go!; wave 4; echo dropping BFG..." bind ; "dropWeapon" Pressing ";" will cause you to drop the BFG, tell your teammates "Here you go!", point, and display on your screen "dropping BFG...". Notice that I did not put quotation marks around the argument of the echo command. That is because you can only put quotation marks around the argument of the main command, in this case the alias dropWeapon. If you put quotation marks around the "dropping BFG...", Quake II will get confused and be unable to parse the line. Up until now, the aliases I have shown you are pretty useless. However, let me show you a case where they might be useful. alias praise1 "say Nice shot!; bind x praise2" alias praise2 "say Good one!; bind x praise3" alias praise3 "say WOW!!!; bind x praise4" alias praise4 "say That was a great shot!; bind x praise1" bind x "praise1" In this code segment, pressing "x" will cause Quake II to say a chat string, and set x to the next alias. Pressing x again will cause it to say the next chat string, up until "praise4", where it sets "x" back to "praise1". This is useful for creating chains of commands where each press of the same key will execute instructions in a sequence. A really useful technique is to use +/- aliases. These will execute the + part when the key gets pressed, and the - part when the key gets released. The following example is used in my config file to make long-distance potshots with the railgun. // a neat sniper alias for zooming in on people // thanks to Desert Gunstar for this one! alias +sniperzoom "fov 30; sensitivity 5; crosshair 18" alias -sniperzoom "fov 140; sensitivity 14; crosshair 35" bind ALT +sniperzoom First of all, I did not forget the quotation marks around the argument of the bind command. If you put them in, Quake II will only run the + alias, never the - alias. When you press ALT with this alias bound to it, you will zoom in when you press ALT, and zoom back out when you release ALT. Very handy in instagib games. Another useful technique is to cause the pressing of one key to affect other keys. For example, // using aliases alias useSG "use Shotgun" alias useSSG "use Super Shotgun" alias useMG "use Machinegun" // dropping aliases alias dropSG "drop Shotgun" alias dropSSG "drop Super Shotgun" alias dropMG "drop Machinegun" // initial binds (so that the 2, 3, & 4 keys actually do something before you press END!) bind 2 "useSG" bind 3 "useSSG" bind 4 "useMG" // the switching binds & aliases alias +dropWeaps "bind 2 dropSG; bind 3 dropSSG; bind 4 dropMG" alias -dropWeaps "bind 2 useSG; bind 3 useSSG; bind 4 useMG" bind END +dropWeaps This will cause you to use the shotgun, super shotgun, or machinegun whenever END is not being held down. However, when END is held down, pressing "2", "3", or "4" will cause you to *drop* that weapon because those keys are now bound to dropping aliases. As soon as you release END, the - alias will reset "2", "3", and "4" back to the using aliases. Very handy for team deathmatch games. I don't have this alias in my .cfg file because I don't tend to play team deathmatch. Another useful alias sequence for TDM follows: // TDM config file for q2dm1 - The Edge // chat strings alias str1 "say_team @chaingun" alias str2 "say_team @grenade launcher" alias str3 "say_team in arena" alias str4 "say_team @lower machine gun" alias str5 "say_team by waterside" alias str6 "say_team @railgun" alias str7 "say_team in megahealth room" alias str8 "say_team @hyperblaster" alias str9 "say_team @upper rocket launcher" alias str10 "say_team @lower rocket launcher" alias str11 "say_team top of elevator" alias str12 "say_team bottom of elevator" // position aliases alias pos1 "bind x str1; bind MWHEELUP pos12; bind MWHEELDOWN pos2; echo ]}CG" alias pos2 "bind x str2; bind MWHEELUP pos1; bind MWHEELDOWN pos3; echo ]}GL" alias pos3 "bind x str3; bind MWHEELUP pos2; bind MWHEELDOWN pos4; echo ]}arena" alias pos4 "bind x str4; bind MWHEELUP pos3; bind MWHEELDOWN pos5; echo ]}lower MG" alias pos5 "bind x str5; bind MWHEELUP pos4; bind MWHEELDOWN pos6; echo ]}waterside" alias pos6 "bind x str6; bind MWHEELUP pos5; bind MWHEELDOWN pos7; echo ]}RG" alias pos7 "bind x str7; bind MWHEELUP pos6; bind MWHEELDOWN pos8; echo ]}MH" alias pos8 "bind x str8; bind MWHEELUP pos7; bind MWHEELDOWN pos9; echo ]}HB" alias pos9 "bind x str9; bind MWHEELUP pos8; bind MWHEELDOWN pos10; echo ]}upper RL" alias pos10 "bind x str10; bind MWHEELUP pos9; bind MWHEELDOWN pos11; echo ]}lower RL" alias pos11 "bind x str11; bind MWHEELUP pos10; bind MWHEELDOWN pos12; echo ]}top elev" alias pos12 "bind x str12; bind MWHEELUP pos11; bind MWHEELDOWN pos1; echo ]}bottom elev" // initial bind of x, MWHEELUP, & MWHEELDOWN bind x str1 bind MWHEELUP pos12 bind MWHEELDOWN pos2 Scrolling the mousewheel will cause Quake II to rotate through the aliases. The echo commands tell me which position I'm about to say where I am. In addition, you can place any of these into a config file (NOT config.cfg, or it will be erased!). Create it as <some_name>.cfg in your baseq2 folder. Then, when Quake II starts, type "exec <some_name>.cfg" minus the quotes. That will prevent Quake II from deleting your binds/aliases.I hope this long-winded post helps! Slayer
You can also bind 2+ functions to a single key, delimited with semicolons, as in bind 5 "use Grenades; use Grenade Launcher"bind e "use Grenade Launcher; use Rocket Launcher; use BFG10K"Quake II will use the items in right-to-left order. In other words, if you press "e", the BFG10K will be used; but if you don't have it (or enough cells!) the rocket launcher will be used. If you don't have that and enough rockets, the grenade launcher will be used.