Mlucci4036 Posted April 5, 2015 Share Posted April 5, 2015 I had this idea in mind that when the player enters this trigger, they will undergo a capture like the one experienced with the Enclave in Fo3. With the script I made, I'm able to disable the player controls and cause the player to fall to the ground, but the timers will not work. Is there any reason why the screen won't fade to black and why the player will not be moved to the next marker? scn BigAppleMetroEndScript float timer BEGIN OnTriggerEnter player set timer to timer+getsecondspasseddisableplayercontrols 1 1 1 1 1 1 1player.AddScriptPackage NVDLC01PlayerKnockedOut if(timer>=2)&&(Timer<3) imod fadetoblackpermanentendif if(timer>=6)&&(Timer<7) player.removescriptpackage player.moveto WakeupREF endifendif END Link to comment Share on other sites More sharing options...
claustromaniac Posted April 5, 2015 Share Posted April 5, 2015 (edited) Yes, the reason is that you need a GameMode block, otherwise that script runs only for one frame.Try something like this: scn BigAppleMetroEndScript float timer Begin OnTriggerEnter player DisablePlayerControls 1 1 1 1 1 1 1 player.AddScriptPackage NVDLC01PlayerKnockedOut set timer to -1 End Begin GameMode if timer == 0 Return ;trim CPU usage elseif timer == -1 set timer to 7 GetSecondsPassed ;ensure GetSecondsPassed returns a desirable value in the next frame Return ;skip the rest of the frame endif set timer to timer - GetSecondsPassed if timer >= 4 && timer <= 5 imod fadetoblackpermanent elseif timer > 0 && timer <= 1 player.RemoveScriptPackage player.MoveTo WakeupREF set timer to 0 endif End Edited April 5, 2015 by claustromaniac Link to comment Share on other sites More sharing options...
Mlucci4036 Posted April 7, 2015 Author Share Posted April 7, 2015 Yes, the reason is that you need a GameMode block, otherwise that script runs only for one frame.Try something like this: scn BigAppleMetroEndScript float timer Begin OnTriggerEnter player DisablePlayerControls 1 1 1 1 1 1 1 player.AddScriptPackage NVDLC01PlayerKnockedOut set timer to -1 End Begin GameMode if timer == 0 Return ;trim CPU usage elseif timer == -1 set timer to 7 GetSecondsPassed ;ensure GetSecondsPassed returns a desirable value in the next frame Return ;skip the rest of the frame endif set timer to timer - GetSecondsPassed if timer >= 4 && timer <= 5 imod fadetoblackpermanent elseif timer > 0 && timer <= 1 player.RemoveScriptPackage player.MoveTo WakeupREF set timer to 0 endif End That worked perfectly, thanks! Link to comment Share on other sites More sharing options...
claustromaniac Posted April 7, 2015 Share Posted April 7, 2015 You're welcome.Actually, now that I take a second look at it, I realize this should work better and it is even shorter: scn BigAppleMetroEndScript float timer int stage Begin OnTriggerEnter player DisablePlayerControls 1 1 1 1 1 1 1 player.AddScriptPackage NVDLC01PlayerKnockedOut GetSecondsPassed ;ensure GetSecondsPassed returns a desirable value in the next frame set timer to 6 set stage to 1 End Begin GameMode if stage == 0 Return ;trim CPU usage elseif stage == 1 && timer <= 4 imod fadetoblackpermanent set stage to -1 elseif timer > 0 set timer to timer - GetSecondsPassed else player.RemoveScriptPackage player.MoveTo WakeupREF set stage to 0 endif End Link to comment Share on other sites More sharing options...
Recommended Posts