Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Rainbow Crosshair [IMPROVED]

A Config Script for Team Fortress 2

Members see zero ads. Membership is 100% free
132 6,794 bytes Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
alias "T_colorfulcrosshair" "T_prettycolors"

alias "T_prettycolors" "pcON"
alias "pcON" "alias T_prettycolors pcOFF; alias crosshaircolors_l crosshaircolors; crosshaircolors_l; cmove"
alias "pcOFF" "alias T_prettycolors pcON; alias crosshaircolors_l ; dmove; defaultcolors"

alias "crosshaircolors" "incrementvar cl_crosshair_green 0 255 1; incrementvar cl_crosshair_red 0 255 2; incrementvar cl_crosshair_blue 0 255 3; wait 1; crosshaircolors_l"
alias "crosshaircolors_l" "crosshaircolors"

alias "defaultcolors" "cl_crosshair_red 127; cl_crosshair_green 127; cl_crosshair_blue 127"

alias "+w" "dw"
alias "-w" "-forward"
alias "+a" "da"
alias "-a" "-moveleft"
alias "+s" "ds"
alias "-s" "-back"
alias "+d" "dd"
alias "-d" "-moveright"

alias "dw" "+forward"
alias "da" "+moveleft"
alias "ds" "+back"
alias "dd" "+moveright"

alias "cw" "+forward; incred"
alias "ca" "+moveleft; incgreen"
alias "cs" "+back; incall"
alias "cd" "+moveright; incblue"

alias "dmove" "alias +w dw; alias +a da; alias +s ds; alias +d dd"
alias "cmove" "alias +w cw; alias +a ca; alias +s cs; alias +d cd"

alias "incred" "incrementvar cl_crosshair_red 0 255 10"
alias "incgreen" "incrementvar cl_crosshair_green 0 255 15"
alias "incblue" "incrementvar cl_crosshair_blue 0 255 5"
alias "incall" "incred; incgreen; incblue"

alias "+cb_shift" "alias +m3 T_colorfulcrosshair; alias +q cycle_options"
alias "-cb_shift" "alias +m3 +attack3; alias +q +reload"
alias "+m3" "+attack3"
alias "-m3" "-attack3"
alias "+q" "+reload"
alias "-q" "-reload"
bind "shift" "+cb_shift"
bind "mouse3" "+m3"
bind "q" "+q"

bind "w" "+w"
bind "a" "+a"
bind "s" "+s"
bind "d" "+d"

// TODO: Make seperate modes for different types of strobe
// REQUIREMENTS:
//  - Modes completed                           [DONE]
//  - Cycle for choosing modes                  [DONE]
//  - Settings (Save settings after changed)    [DONE]

// MODES:
//  Default             [DONE]
//  Greyscale           [DONE]
//  Only red            [DONE]
//  Only green          [DONE]
//  Only blue           [DONE]
//  Custom              [DONE]

//Greyscale
alias "T_grayscale" "GRAYon"
alias "GRAYon" "alias T_grayscale GRAYoff; alias GRAYcrosshair_l GRAYcrosshair; GRAYcrosshair_l"
alias "GRAYoff" "alias T_grayscale GRAYon; alias GRAYcrosshair_l ; wait 5; defaultcolors"
alias "incGRAY" "incrementvar cl_crosshair_red 0 255 1; incrementvar cl_crosshair_green 0 255 1; incrementvar cl_crosshair_blue 0 255 1;"
alias "GRAYcrosshair" "incGRAY; wait 1; GRAYcrosshair_l"
alias "GRAYcrosshair_l" "GRAYcrosshair"

//Only red
alias "T_redonly" "REDon"
alias "REDon" "alias T_redonly REDoff; alias REDcrosshair_l REDcrosshair; REDcrosshair_l"
alias "REDoff" "alias T_redonly REDon; alias REDcrosshair_l ; wait 5; defaultcolors"
alias "REDsetup" "cl_crosshair_green 0; cl_crosshair_blue 0"
alias "REDcrosshair" "incrementvar cl_crosshair_red 0 255 1; wait 1; REDcrosshair_l"
alias "REDcrosshair_l" "REDcrosshair"

//Only green
alias "T_greenonly" "GREENon"
alias "GREENon" "alias T_greenonly GREENoff; alias GREENcrosshair_l GREENcrosshair; GREENcrosshair_l"
alias "GREENoff" "alias T_greenonly GREENon; alias GREENcrosshair_l ; wait 5; defaultcolors"
alias "GREENsetup" "cl_crosshair_red 0; cl_crosshair_blue 0"
alias "GREENcrosshair" "incrementvar cl_crosshair_green 0 255 1; wait 1; GREENcrosshair_l"
alias "GREENcrosshair_l" "GREENcrosshair"

//Only blue
alias "T_blueonly" "BLUEon"
alias "BLUEon" "alias T_blueonly BLUEoff; alias BLUEcrosshair_l BLUEcrosshair; BLUEcrosshair_l"
alias "BLUEoff" "alias T_blueonly BLUEon; alias BLUEcrosshair_l ; wait 5; defaultcolors"
alias "BLUEsetup" "cl_crosshair_red 0; cl_crosshair_green 0"
alias "BLUEcrosshair" "incrementvar cl_crosshair_blue 0 255 1; wait 1; BLUEcrosshair_l"
alias "BLUEcrosshair_l" "BLUEcrosshair"

//Value & Loop resets
alias "resetallloop" "alias crosshaircolors_l; alias GRAYcrosshair_l; alias REDcrosshair_l; alias GREENcrosshiar_l; alias BLUEcrosshair_l; alias SMRGB_MASTER_l; resetcolors&loop"
alias "resettoggles" "alias T_prettycolors pcon; alias T_grayscale GRAYon; alias T_redonly REDon; alias T_greenonly GREENon; alias T_blueonly BLUEon; T_SMRGB SMRGBon; alias T_custom CUSTOMon"

//Custom
alias "T_custom" "CUSTOMon"
alias "CUSTOMon" "alias T_custom CUSTOMoff; alias CUSTOMcrosshair_l CUSTOMcrosshair"
alias "CUSTOMoff" "alias T_custom CUSTOMon; alias CUSTOMcrosshiar_l ; defaultcolors"
alias "CUSTOMcrosshair" "CUSTOMincred; CUSTOMincgreen; CUSTOMincblue; wait 1; CUSTOMcrosshair_l" //Changable Values: wait [1] (Must be above 1. Changing it to a higher number makes the values change slower)
alias "CUSTOMcrosshair_l" "CUSTOMcrosshair_l"

alias "CUSTOMincred" "incrementvar cl_crosshair_red 0 255 0"        //Changable Values: cl_crosshair_red [0][255][0]    (1st value is the minimum, 2nd is max, 3rd is how many you want to increment by)
alias "CUSTOMincgreen" "incrementvar cl_crosshair_green 0 255 0"    //Changable Values: cl_crosshair_green [0][255][0]  (1st value is the minimum, 2nd is max, 3rd is how many you want to increment by)
alias "CUSTOMincblue" "incrementvar cl_crosshair_blue 0 255 0"      //Changable Values: cl_crosshair_blue [0][255][0]   (1st value is the minimum, 2nd is max, 3rd is how many you want to increment by)

// Cycle
alias "cycle_options" "op1"
alias "op1" "echo Crosshair Strobe Mode: Greyscale; alias cycle_options op2; dmove; alias T_colorfulcrosshair T_grayscale; resetallloop; resettoggles; wait 5; defaultcolors"
alias "op2" "echo Crosshair Strobe Mode: Only Red; alias cycle_options op3; dmove; alias T_colorfulcrosshair T_redonly; resetallloop; resettoggles; wait 5; defaultcolors"
alias "op3" "echo Crosshair Strobe Mode: Only Green; alias cycle_options op4; dmove; alias T_colorfulcrosshair T_greenonly; resetallloop; resettoggles; wait 5; defaultcolors"
alias "op4" "echo Crosshair Strobe Mode: Only Blue; alias cycle_options op5; dmove; alias T_colorfulcrosshair T_blueonly; resetallloop; resettoggles; wait 5; defaultcolors"
alias "op5" "echo Crosshair Strobe Mode: Custom; alias cycle_options op6; dmove; alias T_colorfulcrosshair T_custom; resetallloop; resettoggles; wait 5; defaultcolors"
alias "op6" "echo Crosshair Strobe Mode: Default; alias cycle_options op1; alias T_colorfulcrosshair T_prettycolors; resetallloop; resettoggles; wait 5; defaultcolors"

resetallloop
defaultcolors

// Further possible improvements
//  - Confirmation Dialogue
//  - Seizure mode (All effects on at once, croshair size increase/decrease if possible)
//  - Press & hold confirmation (replaces confirmation dialogue)
//  - Bug Fixes:
//      - Certain color options don't properly reset the crosshair to its default colors

Updates

menu
Config update 25d
  • Addition Added 5 extra color configs
The extra configs include:
- Gray scale
- Red only
- Green only
- Blue only
- User defined

To scroll through the options, press SHIFT + Q to change what SHIFT + M3 toggles on and off. Options scroll through in the order above.

To edit the custom loop, go to line 108, and 111-113 and read the commented text. It will tell you what values you can edit and what happens when you edit them

Making your crosshair more interesting

Is the regular gray crossahir TF2 comes with too boring? Do you find looking at a green or yellow crosshair for long periods of time also boring? Are static colors just, too static? Well, ladies and gents, I have a solution for you!

The RAINBOW CROSSHAIR

This beautiful crosshair script will make it so that your crosshair wildly flashes with color while you're fighting that annoying scout that somehow keeps killing your med! And to make sure that all the colors are equally represented, moving around will change what "wheel" of colors you can see! 

Warning!
This script uses a loop, meaning it uses the "wait" command. Certain community servers have the wait command disabled, meaning connecting to or using this script in one of these servers will cause your game to freeze.

Luckily, the wait command is enabled by default on all Valve servers. So people who mainly play in matchmaking shouldn't have any problems. If you do regularly play on community servers, I'd recommend using a WaitTester and Reset .cfg file to make sure you don't accidentally freeze when joining a server

Here are some links if you don't know how to do that:
WaitTester, Scripting, TF2 Wiki
Reset.cfg & you


KEY REBINDS:
WASD - Original functionality is kept, but the keys are later used to change color values
Shift - Used to access the toggle
Mouse 3 - Original functionality is kept, but is used to activate the toggle

INSTALLATION:
1: Copy and paste the code into a file and name it "colors"
2: Navigate to your cfg folder (Tutorial)
3: Drop the file into the folder (cfg folder)
4: Put "exec colors" into your autoexec.cfg file (Make one if you don't have one already)
5: Start up TF2 and have fun!

USAGE:
To activate the script, press SHIFT + MOUSE3. This will start the color changing. To deactivate the script, press SHIFT + MOUSE3 again. This will set your crosshair back to the original TF2 crosshair color and turn off the color changer

PS: Thanks to mnml. for making the original script. If they didn't make it, then I wouldn't have know about the crosshair color changer commands and I wouldn't have been able to make this

Todos

menu
check_box_outline_blank Finish "Possible Improvements" check_box_outline_blank Bug Fixes (Color not resetting) Low Priority

Comments

Sign up to access this!
  • CitizenFoffie avatar
    CitizenFoffie Joined 6d ago
    Offline
    access_time 6d edit 6d
    nvm im a fucking idiot forgot to put it in my cfg

    also got a error
    Crosshair Strobe : Mode Custom
    Unknown command: resetcolors&loop
    Unknown command: T_SMRGB

    also still confused by reading the editing comments, What is the first one mean on line 113, all I want to do is make it from red to green to blue but it doesn't seem to like that
    Bananite
    URL to post:
  • Edward_shooter avatar
    Edward_shooter Joined 2y ago
    Away
    70 points Ranked 60423rd
    access_time 17d
    sry mate, totally missed your comment last weak :P I'll have a look and see if I could help.
    ETAK
    URL to post:

Embed

menu
Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Key Author
Mr.Panface
Mr.Panface Joined 2y ago
Offline
252 points Ranked 52930th
Adding to and improving original
Original Author
mnml.
mnml. Joined 1mo ago
Offline
Original creator and inspiration

Submitter

Mr.Panface avatar
Mr.Panface Joined 2y ago
Onlinen't
252 points Ranked 52930th
Mr.Panface
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

License

menu

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • favorite 4
  • remove_red_eye 805
  • mode_comment 2
  • access_time 27d
  • access_time 25d
  • refresh 25d

More from Submitter

menu

More Other/Misc Scripts