Saxton Hell Forums

General => General Discussion => Topic started by: Shae on July 10, 2013, 02:48:28 pm

Title: Need some scripting help.
Post by: Shae on July 10, 2013, 02:48:28 pm
Code: [Select]
bind "LEFTARROW" "sensitiveOn";

alias "sensitiveOn" "sensitivity 3.15; bind LEFTARROW sensitiveOff";
alias "sensitiveOff" "sensitivity 3.7; bind LEFTARROW sensitiveOn";

Here's the code i need help with. Basically what it does is switch my mouse sensitivity whenever i press the Left Arrow key. It switches between 3.15 and 3.7 ingame mouse sensitivity for sniping and surfing respectively. However my problem is that whenever I press the key, it can be hard to tell what my sensitivity is currently set to without waving my mouse around like a madman or manually going into Options and clicking the Mouse tab to see what its set to.
What i want to do is find a way to code in a little "Indicator" that will tell me what my mouse sensitivity is currently set to without opening any menus, however I have no knowledge of this scripting language at all. Can someone help?

I was thinking perhaps my cross hair will change color whenever change my sensitivity. Like red for low sensitivity and green for high sensitivity.

(For anyone curious about my mouse and its settings. I have a Logitech g400 set to 1800dpi. I personally find 3.15ish sensitivity good enough for sniping, however I am still testing things out.)
Title: Re: Need some scripting help.
Post by: h_twenty on July 24, 2013, 01:43:02 am
I used to code with Lua.... before I took a lazyness to th- you know what, nevermind. (I can't tell what language that is, but I don't think its Lua)

This looks like a job for Voidy.
Title: Re: Need some scripting help.
Post by: MrEskimoMan on July 24, 2013, 07:57:38 am
bind "LEFTARROW" "sensitiveOn";

alias "sensitiveOn" "sensitivity 3.15;echo 3.15; bind LEFTARROW sensitiveOff";
alias "sensitiveOff" "sensitivity 3.7; echo 3.7; bind LEFTARROW sensitiveOn";
now it will say what your sensitivity is in console when you switch
should work
if you want something else to happen then say if this isnt ok
Title: Re: Need some scripting help.
Post by: MrEskimoMan on July 24, 2013, 08:01:36 am
ok lets go ham
bind "LEFTARROW" "sensitiveOn";

alias "sensitiveOn" "sensitivity 3.15;cl_crosshair_green 255;cl_crosshair_blue 255;cl_crosshair_red 255; bind LEFTARROW sensitiveOff";
alias "sensitiveOff" "sensitivity 3.7;cl_crosshair_green 255;cl_crosshair_blue 255;cl_crosshair_red 255; bind LEFTARROW sensitiveOn";
change the 255 to whatever you want, use some RGB thing on the internet to test
Title: Re: Need some scripting help.
Post by: Shae on August 01, 2013, 12:19:21 pm
ok lets go ham
bind "LEFTARROW" "sensitiveOn";

alias "sensitiveOn" "sensitivity 3.15;cl_crosshair_green 255;cl_crosshair_blue 255;cl_crosshair_red 255; bind LEFTARROW sensitiveOff";
alias "sensitiveOff" "sensitivity 3.7;cl_crosshair_green 255;cl_crosshair_blue 255;cl_crosshair_red 255; bind LEFTARROW sensitiveOn";
change the 255 to whatever you want, use some RGB thing on the internet to test
Oh damn thank you man, I know I'm daaaays late but thanks! I really appreciate this!
I'll edit the RGB values to my liking now :)