Difference between revisions of "User:Rythyrix"

From Team Fortress Wiki
Jump to: navigation, search
 
Line 37: Line 37:
 
alias wep3com ""
 
alias wep3com ""
 
</pre>
 
</pre>
What you can do is change the three aliases (wep1com, wep2com, and wep3com) to things like changing crosshair pictures. For example, you can have the Sniper Rifle use a dot crosshair, while the SMG uses a cross, and the Kukri use a circle crosshair, by putting this in your sniper config file (sniper.cfg).
+
What you can do is change the three aliases (wep1com, wep2com, and wep3com) to things like changing crosshair pictures. For example, you can have the Sniper Rifle use a dot crosshair, while the SMG uses a cross, and the Kukri use a circle crosshair, by putting this in your Sniper configuration file (sniper.cfg).
 
<pre>
 
<pre>
 
wep1com "cl_crosshair_file crosshair5"
 
wep1com "cl_crosshair_file crosshair5"
Line 43: Line 43:
 
wep3com "cl_crosshair_file crosshair3"
 
wep3com "cl_crosshair_file crosshair3"
 
</pre>
 
</pre>
 +
To disable the use of this script on any class you do not want to use this, place the following script in a configuration file called unbind.cfg.
 +
<pre>
 +
bind MOUSE1 +attack
 +
bind MOUSE2 +attack2
 +
bind MWHEELUP invprev
 +
bind MWHEELDOWN invnext
 +
bind Q lastinv
 +
bind 1 slot1
 +
bind 2 slot2
 +
bind 3 slot3
 +
bind 4 slot4
 +
bind 5 slot5
 +
 +
alias wep1com ""
 +
alias wep2com ""
 +
alias wep3com ""
 +
</pre>
 +
Obviously, substitute the keys for whatever you use for the corresponding command.
 +
 +
A simple setup for changing the crosshairs of the Sniper class upon weapon switch would be to place this in your Sniper configuration file:
 +
<pre>
 +
wep1com "cl_crosshair_file crosshair5"
 +
wep2com "cl_crosshair_file crosshair7"
 +
wep3com "cl_crosshair_file crosshair3"
 +
</pre>
 +
And this is every other class configuration file:
 +
<pre>
 +
exec unbind
 +
</pre>
 +
 +
This will allow you to switch weapons and crosshairs at the same time and Sniper.

Latest revision as of 21:37, 6 October 2010

Join date: Wednesday, 10-6-2010 (mm-dd-yyyy)

Since there is no script collection page yet, I'll put these here.

The script here allows you to execute any command when you switch to any weapon, assuming the command does not require sv_cheats to be enabled.

alias wep1 "slot1; wep1com; alias mouseup wep-3; alias mousedown wep2; alias quickswap wep-3; alias lastwep wep1; alias curwepcom wep1com; keybind1"
alias wep2 "slot2; wep2com; alias mouseup wep-1; alias mousedown wep3; alias quickswap wep-1; alias lastwep wep2; alias curwepcom wep2com; keybind2"
alias wep3 "slot3; wep3com; alias mouseup wep-2; alias mousedown wep1; alias quickswap wep-2; alias lastwep wep3; alias curwepcom wep3com; keybind3"
alias wep-1 "slot1; wep1com; alias mouseup wep-3; alias mousedown wep2; alias quickswap wep2; alias lastwep wep-1; alias curwepcom wep1com; keybind-1"
alias wep-2 "slot2; wep2com; alias mouseup wep-1; alias mousedown wep3; alias quickswap wep3; alias lastwep wep-2; alias curwepcom wep2com; keybind-2"
alias wep-3 "slot3; wep3com; alias mouseup wep-2; alias mousedown wep1; alias quickswap wep1; alias lastwep wep-3; alias curwepcom wep3com; keybind-3"

alias key1 "wep1"
alias key2 "mousedown"
alias key3 "mouseup"
alias key4 "slot4; extrakey"
alias key5 "slot5; extrakey"
alias extrakey "alias mouseup wep-2; alias mousedown wep3; alias quickswap lastwep; curwepcom; noreload"

alias keybind1 "alias key1 wep1; alias key2 mousedown; alias key3 mouseup"
alias keybind2 "alias key1 mouseup; alias key2 wep2; alias key3 mousedown"
alias keybind3 "alias key1 mousedown; alias key2 mouseup; alias key3 wep3"
alias keybind-1 "alias key1 wep-1; alias key2 mousedown; alias key3 mouseup"
alias keybind-2 "alias key1 mouseup; alias key2 wep-2; alias key3 mousedown"
alias keybind-3 "alias key1 mousedown; alias key2 mouseup; alias key3 wep-3"

alias mouseup "wep-3"
alias mousedown "wep2"
alias quickswap "lastwep"
alias lastwep "wep2"
alias curwepcom "wep1com"

// DO NOT MESS WITH THE ABOVE STUFF
alias wep1com ""
alias wep2com ""
alias wep3com ""

What you can do is change the three aliases (wep1com, wep2com, and wep3com) to things like changing crosshair pictures. For example, you can have the Sniper Rifle use a dot crosshair, while the SMG uses a cross, and the Kukri use a circle crosshair, by putting this in your Sniper configuration file (sniper.cfg).

wep1com "cl_crosshair_file crosshair5"
wep2com "cl_crosshair_file crosshair7"
wep3com "cl_crosshair_file crosshair3"

To disable the use of this script on any class you do not want to use this, place the following script in a configuration file called unbind.cfg.

bind MOUSE1 +attack
bind MOUSE2 +attack2
bind MWHEELUP invprev
bind MWHEELDOWN invnext
bind Q lastinv
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind 4 slot4
bind 5 slot5

alias wep1com ""
alias wep2com ""
alias wep3com ""

Obviously, substitute the keys for whatever you use for the corresponding command.

A simple setup for changing the crosshairs of the Sniper class upon weapon switch would be to place this in your Sniper configuration file:

wep1com "cl_crosshair_file crosshair5"
wep2com "cl_crosshair_file crosshair7"
wep3com "cl_crosshair_file crosshair3"

And this is every other class configuration file:

exec unbind

This will allow you to switch weapons and crosshairs at the same time and Sniper.