[cubescript]default_scopefov = 50
scopefov_increment = 10
validfov = [ bool = 0; if (&& (> $arg1 4) (< $arg1 61)) [ bool = 1 ]; result $bool ]
doscope = [
if (! $numargs) [
scopefov $default_scopefov
setscope 1
onrelease [ setscope 0 ]
] [
if (strcmp $arg1 "+") [
newfov = (- $scopefov $scopefov_increment)
if (validfov $newfov) [ scopefov $newfov ]
]
if (strcmp $arg1 "-") [
newfov = (+ $scopefov $scopefov_increment)
if (validfov $newfov) [ scopefov $newfov ]
]
]
]
altaction_5 = doscope
delta_game_0 = [ if (= (curweapon) 5) [ if (= $arg1 1) [ doscope + ] [ doscope - ] ] [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ] ][/cubescript]
Heres how I'd do it. Scrolling the mouse wheel while scoped will zoom in/out.
If you really want a version that just zooms in when you press F8, just do:
[cubescript]bind F8 [ doscope + ][/cubescript]
scopefov_increment = 10
validfov = [ bool = 0; if (&& (> $arg1 4) (< $arg1 61)) [ bool = 1 ]; result $bool ]
doscope = [
if (! $numargs) [
scopefov $default_scopefov
setscope 1
onrelease [ setscope 0 ]
] [
if (strcmp $arg1 "+") [
newfov = (- $scopefov $scopefov_increment)
if (validfov $newfov) [ scopefov $newfov ]
]
if (strcmp $arg1 "-") [
newfov = (+ $scopefov $scopefov_increment)
if (validfov $newfov) [ scopefov $newfov ]
]
]
]
altaction_5 = doscope
delta_game_0 = [ if (= (curweapon) 5) [ if (= $arg1 1) [ doscope + ] [ doscope - ] ] [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ] ][/cubescript]
Heres how I'd do it. Scrolling the mouse wheel while scoped will zoom in/out.
If you really want a version that just zooms in when you press F8, just do:
[cubescript]bind F8 [ doscope + ][/cubescript]