Originally Posted by
Tally
The game will not detect you holding a key down for a certain period.
Exactly that I wanted to try some days ago and I wasn't able to implement that, though had some nice idea.
In Counter-Strike Source this is possible:
PHP Code:
alias +sens "sensitivity 1"
alias -sens "sensitivity 3"
bind alt +sens
When pressing "Alt-Key" now, the sensitivity is really slow, hence good aiming on far distance.
I wanted to make that for CoD 2 starting with:
PHP Code:
set +sens "sensitivity 1"
That fails already, because cvar-keys are not allowed to have "+" in it. But there is a way around:
PHP Code:
// set +sens is not possible, illegal name
set sens_p "sensitivity 1; say test_a"
set sens_m "sensitivity 3; say test_b"
// they didnt check in setfromdvar though :)
setfromdvar +sens sens_p
setfromdvar -sens sens_m
// the actual binding:
bind o +sens
That looked for me, that it could already work, but the result is kinda strange:
PHP Code:
// pressing o results in:
// +sens = "111 -1471273609"
// -sens = "111 -1471273546"
// the last number is always random, but often starts with -147
Well, "bind o +sens" kinda "executes" a cvar, so I tried stuff like
PHP Code:
bind o "vstr +sens"
, but that doesn't worked also :S Would be nice if somebody push the idea with +/- further for new state-keys like attackButtonPressed().