Page 1 of 1

Zoom script

Posted: Sun Nov 13, 2005 6:43 pm
by D'Artagnan
This one is interressing too...i just don't get it...how does it work ?

Zoom with Custom Sensitivity Adjust
Adjust as required, this script cycles between 40 / 110 fov and adjusts sensitivity accordingly. NOTE: this script will only work on servers that do not limit g_fov settings (90 to 110)

bind q "toggle g_fov 40 110; toggle sensitivity 5 15; addchatline 'FOV';addchatline $g_fov"

the way i understand it, is that when i hit the bind key (q for the exemple) i'm gonna change the fov and sensitivity, but i'm gonna have to hold the key, and thats what i don't want.
I wanna bind a key so if i press it, i'm gonna change the fov and sens, and when ill press again the same bind, it will go back to normal fov and sens...

Posted: Sun Nov 13, 2005 7:23 pm
by D'Artagnan
OK i'm getting close to what i want, so maybe someone better then me could improve what i have done so far, it work but i'm just a newb at script;

// Zoom Script //
set zoomin "toggle g_fov 40 105; toggle sensitivity 2 5; addchatline 'FOV';addchatline $g_fov"
set zoomout "toggle g_fov 105 40; toggle sensitivity 5 2; addchatline 'FOV';addchatline $g_fov"
set zoomtoggle vstr zoomin
bind SPACE "vstr zoomtoggle"

Posted: Sun Nov 13, 2005 7:34 pm
by Requ!em
I wanna bind a key so if i press it, i'm gonna change the fov and sens, and when ill press again the same bind, it will go back to normal fov and sens...
Please mention your sources, the script you found is in http://ucguides.savagehelp.com/Quake4/scripts.htm

bind q "toggle g_fov 40 110; toggle sensitivity 5 15; addchatline 'FOV';addchatline $g_fov"

The script already does what you want, it simply cycles the values for two cvars.

First keypress sensitivity gets set to 5 and g_fov gets set to 40
Next keypress sensitivity gets set to 15 and g_fov gets set to 110
Next keypress sensitivity gets set to 5 and g_fov gets set to 40
etc.

Posted: Sun Nov 13, 2005 8:09 pm
by D'Artagnan
OH, ok i understand better now...thanks...