ALIASES EXPLAINED



What is an Alias ??

How do you use one ??

An example of a simple cycling alias

An example of a simple non-cycling alias

An example of a simple on/off alias



Touch me again - and I'll kill ya'!!



What is an Alias ??

An alias is an advanced macro which can perform multiple and more complicated functions than a simple keybind.
For example, you can make an alias which will allow you to rocket jump at the press of a single button.

To top

To top


How do you use one ??

An alias is bound to a key, in the same way that any console command can be bound. However multiple presses of that key can lead to different results depending on the function of the alias.

To top

To top


An example of a simple cycling alias

Here is a simple alias for changing the handedness of your player:

bind h change0
alias change0 "hand 1;bind h change1"
alias change1 "hand 2;bind h change2"
alias change2 "hand 0;bind h change0"

This alias works like this:
On the first press of "h" player becomes left-handed, another press and he's centre-handed, one more press and he's right-handed again.
You can press "h" as many times as you like, and it'll keep cycling through the hand positions.

Let's break it down further to see how it does that:

Line 1: This binds "h" to the alias change0. i.e. If "h" is pressed it will execute the alias change0
Line 2: This line names the alias change0. It then gives the console command hand 1 which makes the player left-handed. Finally it rebinds "h" to a new alias, change1. If "h" is pressed NOW it will execute change1
Line 3: is the new alias change1 - this alias changes the player to centre-handed and rebinds "h" to execute the alias change2
Line 4: is the new alias change2 - this returns the player to right-handedness and rebinds "h" to execute change0.

And so on and so forth in a cycle.

To top

To top


An example of a simple non-cycling alias

Here is a simple alias for recording a quake2 demo and performing a console dump:

bind r rec0
alias rec0 "record match;bind r rec1"
alias rec1 "stop;condump match;bind r rec2"
alias rec2 "echo SORRY - CANNOT WRITE OVER DEMO :)"

This alias starts recording the demo match.dm2 when "r" is first pressed.
On the second press (e.g. at the end of the match) it stops recording and dumps the console text to match.txt
If it is pressed again it will give you the message "SORRY - CANNOT WRITE OVER DEMO :)".
This acts as a useful safety feature in case you press "r" again by mistake; in a cycling alias you would have accidentally written over the demo.
It does this by omitting the rebinding of "r" in the final line. "r" therefore remains bound to rec2.

To top

To top


An example of a simple on/off alias

bind z +sz
alias +sz "fov 20;set sensitivity 2.000000"
alias -sz "fov 90;set sensitivity 4.000000"

This alias performs a zoom function, by altering your field of view (fov).
As you can see this alias has a plus and minus sign in front of the command sz.
This means that when the "z" key is pressed, it will execute the sz alias. BUT when released, it negates the effects of the alias.
In this case, pressing "z" will give the zoom effect, and releasing it will return your vision to normal.

to Top BACK TO TOP To Top