Author Topic: Need some scripting help.  (Read 4112 times)

Offline Shae

  • Member
  • *
  • Posts: 130
  • Saxton hell's local black gentleman.
Need some scripting help.
« 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.)

I prefer a tofu fried chicken substitute.

Offline h_twenty

  • Member
  • *
  • Posts: 204
  • The Demopan is only OP when I play him.
Re: Need some scripting help.
« Reply #1 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.
Joined during 2011.
I'm h_twenty, and I approve this messege.

Offline MrEskimoMan

  • Member
  • *
  • Posts: 224
  • if you read this you're gay : -)
Re: Need some scripting help.
« Reply #2 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
#StopRuiningProphunt2K13 :)

Offline MrEskimoMan

  • Member
  • *
  • Posts: 224
  • if you read this you're gay : -)
Re: Need some scripting help.
« Reply #3 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
#StopRuiningProphunt2K13 :)

Offline Shae

  • Member
  • *
  • Posts: 130
  • Saxton hell's local black gentleman.
Re: Need some scripting help.
« Reply #4 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 :)

I prefer a tofu fried chicken substitute.