Alias: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Alias allows you to create your own console commands. It's like a config.cfg I believe the commands may go away after exiting the game. You may want to store your aliases in a config.cfg, such as AutoExec.cfg or UserConfig.cfg
An alias is a console command that invokes other commands. Aliases will only act for the game session in which they are called upon in; however, binds in an alias can last if your config.cfg is not set to read only. It is common for aliases to be defined in the autoexec.cfg file, or, in the case of Team Fortress 2, in the class config files that are executed when a class is chosen


Remeber to make a - for every + command you make.
An alias can have two states, + and -


== Examples ==
== Examples ==
alias "+ThirdPerson" "ThirdPerson"
alias "+ThirdPerson" "ThirdPerson"
alias "-ThirdPerson" "FirstPerson"
alias "-ThirdPerson" "FirstPerson"


alias "ZoomON" "+zoom; alias ZoomToggle ZoomOFF"
alias "ZoomON" "+zoom; alias ZoomToggle ZoomOFF"
alias "ZoomOFF" "-zoom; alias ZoomToggle ZoomON"
alias "ZoomOFF" "-zoom; alias ZoomToggle ZoomON"
alias "ZoomToggle" "ZoomON"
alias "ZoomToggle" "ZoomON"


alias "FoVx85" "FoV 85; alias FoVxIN FoVx85; alias FoVxOUT FoVx90"
alias "FoVx85" "FoV 85; alias FoVxIN FoVx85; alias FoVxOUT FoVx90"
alias "FoVx90" "FoV 90; alias FoVxIN FoVx85; alias FoVxOUT FoVx95"
alias "FoVx90" "FoV 90; alias FoVxIN FoVx85; alias FoVxOUT FoVx95"
alias "FoVx95" "FoV 95; alias FoVxIN FoVx90; alias FoVxOUT FoVx95"
alias "FoVx95" "FoV 95; alias FoVxIN FoVx90; alias FoVxOUT FoVx95"
alias "FoVxIN" "FoVx90"
alias "FoVxIN" "FoVx90"
alias "FoVxOUT" "FoVx90"
alias "FoVxOUT" "FoVx90"




== See Also ==
== See Also ==
http://developer.valvesoftware.com/wiki/Console_Command_List
http://developer.valvesoftware.com/wiki/Console_Command_List

Revision as of 04:27, 27 April 2010

An alias is a console command that invokes other commands. Aliases will only act for the game session in which they are called upon in; however, binds in an alias can last if your config.cfg is not set to read only. It is common for aliases to be defined in the autoexec.cfg file, or, in the case of Team Fortress 2, in the class config files that are executed when a class is chosen

An alias can have two states, + and -

Examples

alias "+ThirdPerson" "ThirdPerson"
alias "-ThirdPerson" "FirstPerson"
alias "ZoomON"		"+zoom; alias ZoomToggle ZoomOFF"
alias "ZoomOFF"		"-zoom; alias ZoomToggle ZoomON"
alias "ZoomToggle"	"ZoomON"
alias "FoVx85" "FoV 85; alias FoVxIN FoVx85; alias FoVxOUT FoVx90"
alias "FoVx90" "FoV 90; alias FoVxIN FoVx85; alias FoVxOUT FoVx95"
alias "FoVx95" "FoV 95; alias FoVxIN FoVx90; alias FoVxOUT FoVx95"
alias "FoVxIN" "FoVx90"
alias "FoVxOUT" "FoVx90"


See Also

http://developer.valvesoftware.com/wiki/Console_Command_List