ST-CS-10-339-75
March 2002
4. Binds and Aliases (U)
When a player presses a key in Half-life and something happens, it is because that key has been "bound" to a command. For example, the up arrow key is bound to the move forward command.
Every command in Half-life can also be directly executed from the console. The console is a text interface to Half-life which is only available if the hl.exe program is started with the argument "-console". Normally, pressing the "`" key (top left of the keyboard, to the left of the "1" key) displays the console on screen.
Half-life also supports aliases. An alias is a name which when typed in the console, executes a whole series of commands, one after the other. Players use the alias command to tell Half-life which commands to execute for a given alias name. Usefully, aliases can be bound to a key so a whole series of commands - such as buy gun, buy ammo, buy armour - can be made to happen at the press of one key.
Finally, Half-life can also execute scripts - text files on disk which are lists of commands - using the exec command. Typically, players store their aliases in a text file or two, execute those text files so Half-life loads the aliases, and then have keys bound to execute those aliases in-game. This is how buy scripts work.
| prev page | - viii - | next page |