Half-Life Console HelpYou can use it to execute scripts, bind keys to command(s), change the value of game variables, and make aliases (really just a special kind of variable). That may not sound like much, but with some clever use of the alias command you can make some pretty amazing things. Keep in mind that executing a script file is basically the same thing as opening the console and typing in those same lines (the only difference being the need for the set keyword when changing variable values in script files). A script file is just a text file that you create in or copy to the Half-Life/Valve/ directory and includes console commands and variable settings, one per line, and/or separated by semicolons (;). That is, a semicolon OR a newline (return) indicates the end of a command in a script file. In general it's easier to test
the effect of variable changes or short scripts or binds by typing the
commands directly into the console. (Keep in mind that some changes, particularly
video and sound settings, will not take effect until the game is restarted).
Once you have it right, just duplicate the commands that you typed in a
text file (autoexec.cfg if you want it to be automatic).
Executing
Scripts
You can execute as many different configs as you like whenever you want (even during a game), but keep in mind that Half-Life/Valve/autoexec.cfg is executed automatically when you join a game, and the last config executed will overwrite any settings in previous configs. You can even have one config
execute another (by putting exec other_config.cfg as one line
in the first one), or make a key or mouse button execute a config (by binding
the key to execute it, as in bind x "exec myconfig.cfg").
|