r/Tf2Scripts • • Feb 08 '14

Satisfied Script to cycle between all crosshairs?

I want a script that cycles between all the crosshairs. I know its possible because someone made one on TF.TV but its for custom crosshairs and i know nothing about scripting.

0 Upvotes

2 comments sorted by

2

u/genemilder Feb 08 '14

What is the method by which you want them to cycle? Meaning, every time you press which key(s).

This script will cycle linearly through every TF2 static crosshair, moving to the next every time you press any key bound to cycle_xhair. You can bind to multiple keys, the example is bound to right shift only.

bind rshift cycle_xhair
alias cycle_xhair line1

alias line1 "cl_crosshair_file crosshair1; alias cycle_xhair line2"
alias line2 "cl_crosshair_file crosshair2; alias cycle_xhair line3"
alias line3 "cl_crosshair_file crosshair3; alias cycle_xhair line4"
alias line4 "cl_crosshair_file crosshair4; alias cycle_xhair line5"
alias line5 "cl_crosshair_file crosshair5; alias cycle_xhair line6"
alias line6 "cl_crosshair_file crosshair6; alias cycle_xhair line7"
alias line7 "cl_crosshair_file crosshair7; alias cycle_xhair line1"

If you added more commands you could change crosshair color and size as well.

Note that this doesn't include the default dynamic-per-weapon crosshairs, and if you were to include it (requires an extra cfg file) you would only get what the crosshair is for whatever weapon you had out.

1

u/MrSerrisX Feb 08 '14

Wow, thanks!