What does minimum delay time mean?
0.0150
if you're serious about that, do you really need it to go that fast? And for how long were you going to keep it at that speed?
1. It has to process input events from he player constantly so it has to react asap.
2. Forever?
To really get a sense of what your situation is, you'd need to explain a bit more about what you are using the quest scripts for.
Well, I could post it for a start:
scn ZRMainScriptshort initshort zoomTrap; 1 = no weapon; 2 = holstered weapon; 3 = weapon without scope; 4 = weapon with scopeshort modeshort lastModeshort zoomingshort reloadingshort holdingBreathfloat timershort holdTimeref weaponref lastWeaponfloat weaponFOVfloat weaponRange; Keysshort zoomKeyshort internalZoomKeyshort holdBreathKey;----------------------------------------------------------------------------------------------------------------------------------------------; Init blockBegin GameModeif init == 0 set init to 1 set zoomKey to 257 ; left mouse button set internalZoomKey to 38; L key set holdBreathKey to 56 ; left shift keyendifEnd;----------------------------------------------------------------------------------------------------------------------------------------------; Mode setting blockBegin GameModeset weapon to player.getEquippedObject 5if weapon == 0 set mode to 1elseif player.isWeaponOut == 0 set mode to 2elseif getWeaponHasScope weapon == 0 set mode to 3else set mode to 4endifif lastMode != mode || weapon != lastWeapon; Remove zoom effect for scopes if mode == 1 || mode == 2 || mode == 3 con_SetGameSetting "fIronSightsFOVTimeChange", "0.25" else con_SetGameSetting "fIronSightsFOVTimeChange", "0" set weaponFOV to getWeaponSightFOV weapon set weaponRange to getWeaponMaxRange weapon ; TODO: Zoom if weaponFOV <= 25 && weaponRange >= 2000 PrintToConsole "3 StepZoom" elseif weaponFOV <= 35 && weaponRange >= 1000 PrintToConsole "2 StepZoom" elseif weaponFOV <= 40 PrintToConsole "1 StepZoom" endif endif; Reset everything when mode changed while zooming if zooming == 1 releaseKey internalZoomKey set zoomTrap to 0 set zooming to 0 endifendifset lastMode to modeset lastWeapon to weaponEnd;----------------------------------------------------------------------------------------------------------------------------------------------; Hold breath blockBegin GameMode; Regenerate/Keep holdingif holdTime > 0 if timer > 0 set timer to timer - getSecondsPassed else set timer to 1 ; Regenerate if holdingBreath == 0 if holdTime == 1 PrintToConsole "1.0" con_SetGameSetting "fGunWobbleMultScope", "1.0" elseif holdTime == 2 PrintToConsole "2.0" con_SetGameSetting "fGunWobbleMultScope", "2.0" elseif holdTime >= 3 PrintToConsole "3.0" con_SetGameSetting "fGunWobbleMultScope", "3.0" elseif holdTime >= 4 PrintToConsole "4.0" con_SetGameSetting "fGunWobbleMultScope", "4.0" endif set holdTime to holdTime - 1 ; Keep Holding else if holdTime >= 4 set holdingBreath to 0 PrintToConsole "4.0" con_SetGameSetting "fGunWobbleMultScope", "4.0" playSound ZRReleaseBreathLong else set timer to 1 set holdTime to holdTime + 1 playSound ZRHeartBeat endif endif endifendif; Scoped weapon, zooming, hold breath key pressed and not firing a weaponif mode == 4 && zooming == 1 && isKeyPressed holdBreathKey == 1 && player.getAnimAction != 2 if holdingBreath == 0 if holdTime == 0 set holdingBreath to 1 PrintToConsole "0.33" con_SetGameSetting "fGunWobbleMultScope", "0.33" set timer to 1 set holdTime to 1 playSound ZRHoldBreath endif endif; No scoped weapon or not zooming or not pressing hold breath key or firing a weaponelse if holdingBreath == 1 set holdingBreath to 0 if holdTime >= 3 PrintToConsole "3.0" con_SetGameSetting "fGunWobbleMultScope", "3.0" playSound ZRReleaseBreathMedium else PrintToConsole "2.0" con_SetGameSetting "fGunWobbleMultScope", "2.0" playSound ZRReleaseBreathShort endif endifendifEnd;----------------------------------------------------------------------------------------------------------------------------------------------; Main blockBegin GameMode;---------------------------------------------------------------; Default zooming behaviourif mode == 1 || mode == 2 || mode == 3 if isKeyPressed zoomKey == 1 if zoomTrap == 0 holdKey internalZoomKey set zooming to 1 set zoomTrap to 1 endif else if zoomTrap == 1 releaseKey internalZoomKey set zooming to 0 set zoomTrap to 0 endif endif return;---------------------------------------------------------------; Toggle zoomingelseif mode == 4; Handle reload if player.getAnimAction == 9 if zooming == 1 && reloading == 0 releaseKey 38 set zooming to 0 set reloading to 1 endif else if reloading == 1 holdKey 38 set zooming to 1 set reloading to 0 return endif endif if isKeyPressed zoomKey == 0 set zoomTrap to 0 return endif if zoomTrap == 1 return endif set zoomTrap to 1; Zoom in if zooming== 0 holdKey 38 set zooming to 1; Zoom out else releaseKey 38 set zooming to 0 endif returnendifEnd
What it does, in a nutshell:
- Make the zoom for scoped weapons toggleable and instant
- Add the ability to hold your breath while zooming.