ThatFalloutGuy2 Posted August 31, 2023 Share Posted August 31, 2023 Hey everyone, I've got a pretty easy case. I made this neat vertibird interior scene I scrapped from FO3 Broken Steel, the script and its functions work perfectly, but I can't seem to figure out a way to make the trigger repeatable. where the script will play out each time the player enters the trigger, as right now it only works once. scn EPVertibirdinteriorScript ;Looping interior vertibird scene short Stamp ; Stage Variablefloat timer ; Timer Variable ;****************************************** Begin onTriggerEnter Player if (Stamp == 0)imod FadeInFromBlack4sISFX EPDoor.disable ;make sure the Exit door is disabledendif if (GetCurrentTime < 6) || (GetCurrentTime > 19)lightput.enable ;light activatorendif set timer to 5playsound OBJVertibirdTakeoffset Stamp to 1 End ;****************************************** Begin gameMode if (Stamp == 1)if (timer <= 0) ;Pilot take off topicEPMark.enable ;enable the xmarker looping soundset timer to 10set Stamp to 2elseset timer to (timer - GetSecondsPasseD)endif elseif (Stamp == 2)if (timer <= 0)playsound OBJVertibirdLandEPMark.disable ;Disable the looping Xmarker sound ;Pilot landing topicset timer to 8set Stamp to 3elseset timer to (timer - GetSecondsPasseD)endif elseif (Stamp == 3)if (timer <= 0) Showmessage EPExitVertibirdMSG ;show message to exit the vertibird EPDoor.enable ;enable the exit door to the vertibirdset timer to 4set Stamp to 4elseset timer to (timer - GetSecondsPassed)endif elseif (Stamp == 4)if (timer <= 0) Set Stamp to 5elseset timer to (timer - GetSecondsPassed)endifendif End ;****************************************** Link to comment Share on other sites More sharing options...
sullyvanj93 Posted August 31, 2023 Share Posted August 31, 2023 (edited) Should be a pretty easy fix! After the script runs, your "Stamp" variable is left at value 5 per the last condition block and does not reset to 0. You need to reset the Stamp value to 0 at the end of the script, or when the player leaves the trigger, whichever would make most sense for your script. Edited August 31, 2023 by sullyvanj93 Link to comment Share on other sites More sharing options...
ebizoe Posted August 31, 2023 Share Posted August 31, 2023 (edited) This first chunk in the first script needs the variable "Stamp" to be 0 to run, but "Stamp" stays 5 after the first run. if (Stamp == 0) ;Stamp will never be 0 after the first run imod FadeInFromBlack4sISFX EPDoor.disable ;make sure the Exit door is disabled endifSo I think setting Stamp to 0 instead 5 on the "stage 4" solves your problem here. EDIT: Damn, sullyvanj93 solved it first. Edited August 31, 2023 by ebizoe Link to comment Share on other sites More sharing options...
Recommended Posts