V-Man Smooth Zoom
#6
Uh...
I couldn't find it on my computer, so I just redid it. XD
// Smooth-zoom script, 1.1.0.4 redux by DES|V-Man; previous work by kirin and Gibstick.
// Bind "smoothzoom" to the key you wish to use for this purpose.

if (checkalias dfov) [] [alias dfov $fov]
if (checkalias zoominrate) [] [alias zoominrate 250]
if (checkalias zoomoutrate) [] [alias zoomoutrate 125]
if (checkalias zoomfov) [] [alias zoomfov 75]

alias zoomingin 0
alias zoomingout 0

alias smoothzoom [
alias zoominstarttime (millis)
alias zoomingin 1
zoominloop
onrelease [
alias zoomoutstarttime (millis)
alias zoomingout 1
zoomoutloop]]

alias zoominloop [
if $zoomingin [
  alias newfov (-f $fov (*f (-f $dfov $zoomfov) (divf (-f (millis) $zoominstarttime) $zoominrate)))
  if (>=f $newfov $zoomfov) [fov $newfov] [fov $zoomfov; alias zoomingin 0]
  sleep 0 [zoominloop]] []]

alias zoomoutloop [
if $zoomingout [
  alias newfov (+f $fov (*f (-f $dfov $zoomfov) (divf (-f (millis) $zoomoutstarttime) $zoomoutrate)))
  if (<=f $newfov $dfov) [fov $newfov] [fov $dfov; alias zoomingout 0]
sleep 0 [zoomoutloop]] []]

newmenu "Smooth-Zoom"
menuitemtextinput [Default FOV (where FOV rests): ] [result $dfov] [alias dfov $arg1] 3
menuitemtextinput [Zoomed FOV (extent to which FOV zooms): ] [result $zoomfov] [alias zoomfov $arg1] 3
menuitemtextinput [Zoom-in rate (higher is slower): ] [result $zoominrate] [alias zoominrate $arg1] 6
menuitemtextinput [Zoom-out rate (higher is slower): ] [result $zoomoutrate] [alias zoomoutrate $arg1] 6
menuitem [                Apply Now!                ] [closemenu]

alias smoothmenu [showmenu "Smooth-Zoom"]
Thanks given by:


Messages In This Thread
V-Man Smooth Zoom - by ActionGoose - 27 Nov 10, 06:13PM
RE: V-Man Smooth Zoom - by ExodusS - 27 Nov 10, 06:43PM
RE: V-Man Smooth Zoom - by V-Man - 28 Nov 10, 12:07AM
RE: V-Man Smooth Zoom - by ActionGoose - 28 Nov 10, 04:32AM
RE: V-Man Smooth Zoom - by ExodusS - 28 Nov 10, 02:51PM
RE: V-Man Smooth Zoom - by V-Man - 28 Nov 10, 03:20PM
RE: V-Man Smooth Zoom - by ActionGoose - 28 Nov 10, 08:45PM
RE: V-Man Smooth Zoom - by Gibstick - 28 Nov 10, 11:20PM
RE: V-Man Smooth Zoom - by ActionGoose - 28 Nov 10, 11:39PM
RE: V-Man Smooth Zoom - by V-Man - 29 Nov 10, 12:02AM
RE: V-Man Smooth Zoom - by V-Man - 29 Nov 10, 03:33PM
RE: V-Man Smooth Zoom - by Bukz - 29 Nov 10, 04:31PM
RE: V-Man Smooth Zoom - by V-Man - 30 Nov 10, 01:14AM
RE: V-Man Smooth Zoom - by Gibstick - 30 Nov 10, 01:31AM
RE: V-Man Smooth Zoom - by V-Man - 30 Nov 10, 01:42AM
RE: V-Man Smooth Zoom - by Kirin - 30 Nov 10, 10:44PM
RE: V-Man Smooth Zoom - by jakson - 24 Feb 11, 07:58PM
RE: V-Man Smooth Zoom - by Gibstick - 30 Nov 10, 11:44PM
RE: V-Man Smooth Zoom - by V-Man - 24 Feb 11, 08:05PM
RE: V-Man Smooth Zoom - by Kirin - 26 Feb 11, 09:37PM
RE: V-Man Smooth Zoom - by V-Man - 26 Feb 11, 09:41PM
RE: V-Man Smooth Zoom - by Kirin - 26 Feb 11, 09:49PM
RE: V-Man Smooth Zoom - by V-Man - 26 Feb 11, 09:58PM
RE: V-Man Smooth Zoom - by Kirin - 26 Feb 11, 10:06PM
RE: V-Man Smooth Zoom - by V-Man - 26 Feb 11, 10:14PM
RE: V-Man Smooth Zoom - by Kirin - 26 Feb 11, 10:23PM
RE: V-Man Smooth Zoom - by Boomhauer - 24 Mar 11, 05:56AM
RE: V-Man Smooth Zoom - by V-Man - 24 Mar 11, 07:29AM
RE: V-Man Smooth Zoom - by Boomhauer - 24 Mar 11, 08:07AM
RE: V-Man Smooth Zoom - by V-Man - 24 Mar 11, 04:09PM
RE: V-Man Smooth Zoom - by Boomhauer - 24 Mar 11, 11:40PM
RE: V-Man Smooth Zoom - by V-Man - 25 Mar 11, 08:00AM
RE: V-Man Smooth Zoom - by Sweet - 25 Mar 11, 03:45PM
RE: V-Man Smooth Zoom - by V-Man - 25 Mar 11, 04:56PM
RE: V-Man Smooth Zoom - by SuperSniper - 08 Apr 11, 06:13PM
RE: V-Man Smooth Zoom - by V-Man - 08 Apr 11, 07:54PM
RE: V-Man Smooth Zoom - by StRaTo - 08 Apr 11, 10:35PM
RE: V-Man Smooth Zoom - by SuperSniper - 12 Apr 11, 06:57PM