Half-Life Console Help

Getting Your Scripts To Tell You Things
There are two ways to get your scripts to give you feedback (messages, confirmations, etc.): echoing and speaking. Here's the format for the echo command:
echo "message to echo to the console"
The echo console command will print whatever follows it (in quotes) to the console. Unfortunately, unless you open the console (rather inconvenient during a melee), you can't see what you just echoed. If, however, you enable developer mode (developer 1), you can see console messages at the top of your screen even with the console closed. Unfortunately, in developer mode you'll also see lots of other annoying messages that you don't want to see. To solve this little problem, enable developer mode, echo your messge, and then disable developer mode, like this:
developer 1; echo "my message"; developer 0
To save on typing (and script memory space), you can set up some aliases like this:
alias devon "developer 1"
alias devoff "developer 0"
And then use them anywhere else in any script to replace the original line with:
devon; echo "my message"; devoff
Text to the screen too distracting? Can't take your eyes off of those crosshairs? Then skip the echo command and make your scripts speak to you (in the voice of the intercom announcer in the single-player game) using the speak command. Here are the TWO general formats for speak, but it's way more useful as an alias (the first form shown):
alias myalias "speak word1,word2,word3,. . .,wordN"
speak word1,word2,word3, . . .wordN
Note that there are no spaces between the words -- any space will be considered the end of the sequence of words to speak, and so no words after a space will be spoken. (Thanks [NI]Redleg). The speak command lets you have your scripts say any of 622 different words. Some people use varying numbers of wait commands between speak commands to add pauses to the speech, but the built in special "words" _comma and _period insert short or long delays (respectively) when used with speak.

Here's a Complete List of the 622 Available Speak Words Plus the 2 Special Words. Just about anything you could need is there, and if you need more, just record what you want as a .wav file, put it in Half-Life/Valve/Sounds/ and play it with:

play filename.wav
The .wav is optional. Oh, and make sure you don't use those commands to make anything like the following script:
speak "touch the red flag and get a rocket in your ass"
. . . because no one but you will hear it :)

Now that we know how to get our scripts to give feedback (text and/or speech), let's return to the Lag-Proofing script and make it easier to tell which speed mode (fast, medium, or slow) is active:

alias w5 "wait; wait; wait; wait; wait"
alias w10 "w5; w5"
alias w20 "w10; w10; "
alias w30 "w20; w10"

alias b1 "wait"
alias b2 "wait; wait"
alias b3 "wait; wait; wait"
alias b4 "wait; wait; wait; wait"

alias w1 "b1"
alias w3 "b3"
alias w6 "w3; w3"
alias w9 "w3; w6"
alias w12 "w6; w6"

alias t_fast "speak fast; devon; echo **** Script speed -->FAST<--; devoff"
alias t_norm "speak middle; devon; echo **** Script speed -->NORMAL<--; devoff"
alias t_slow "speak slow; devon; echo **** Script speed -->SLOW<--; devoff"
alias switch1 "bind / switch2; t_fast; alias w3 b2; alias w1 b1"
alias switch2 "bind / switch3; t_norm; alias w3 b3; alias w1 b1"
alias switch3 "bind / switch1; t_slow; alias w3 b4; alias w1 b2"

switch2 // starts off with "normal" speeds
bind x switch3

[Previous Page] [Back to Console Index] [Next Page]