+ Reply to Thread
Results 1 to 2 of 2

Thread: script problem

  1. #1
    Junior Member Tellah is on a distinguished road
    Join Date
    Aug 2010
    Posts
    4

    script problem

    hi everyone

    i have to do a script but i can't figure out how to do it.

    Basically what i want to do is: to assign to a key a specif sensitivity, so when i release the button it return to the sensitivity of cfg.

    Ex: i hold down "c" and the sensitivity change into 1, when i release c the sensitivity goes back to what i've assigned into the command sensitivity "..."

    Is it possible to do that?

    Thanks a lot

  2. #2
    Senior Member Lorfa is a jewel in the rough Lorfa is a jewel in the rough Lorfa is a jewel in the rough Lorfa's Avatar
    Join Date
    Aug 2010
    Location
    Kepler-22b
    Posts
    8,844
    Quote Originally Posted by Tellah View Post
    Basically what i want to do is: to assign to a key a specif sensitivity, so when i release the button it return to the sensitivity of cfg.
    alias +lowsens "sensitivity 1"
    alias -lowsens "sensitivity 4"

    Ex: i hold down "c" and the sensitivity change into 1, when i release c the sensitivity goes back to what i've assigned into the command sensitivity "..."

    Is it possible to do that?
    Not exactly. There is no way to 'grab' the value of sensitivity to be used in a script so unfortunately you would have to update your alias when you changed your sensitivity. This could be made easier with something like:

    alias +lowsens "vstr lowersens"
    alias -lowsens "vstr normalsens"

    set lowersens "sensitivity 1"
    set normalsens "sensitivity 4"

    That way if you are using sens 4, and decide to try sens 5, you would just do:

    \sensitivity 5
    \set normalsens "sensitivity 5"

    I would prefer this since re-aliasing -lowsens is a little bit scary, with the alias bug lurking just around the corner (Cmd_Addcommand oh joy).

    It would be nice if you could do something like:

    alias +lowsens "sensitivity x"
    alias -lowsens "sensitivity $"

    \x = 1

    ..and sensitivity $ would refer to the current value of sensitivity.

    This however is not supported at this time.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts