amokrun1 Posted August 18, 2022 Posted August 18, 2022 So what I want is super basic I imagine but I am having trouble finding out how to do it. I am working on a mod where you interact with an activator(a gate)to go to a new cell. Once placed in the new cell, I use a modified fade-from-white IMOD that finishes in 12 seconds. I want a messagebox to appear after 12 seconds, once the picture is completely faded in. What scripting do I need to do to apply a timer to the message so that it will always appear 12 seconds after I am placed in the new cell?
StealthDick Posted August 18, 2022 Posted August 18, 2022 Here you are: scn ActivatorScript int iStage float fTimer Begin OnActivate Player if iStage == 0 set iStage to 1 set fTimer to 12 ; You may want to play around with this - to refine it to your liking. imod FadeFromWhite12Sec endif end Begin Gamemode if iStage == 1 if (fTimer > 0) set fTimer to fTimer - GetSecondsPassed else if (IsImageSpaceActive FadeFromWhite12Sec != 1) showMessage MyMessageBox set iStage to 2 endif endif endif end
StealthDick Posted August 18, 2022 Posted August 18, 2022 Ahhh I see you wanted it to follow you into the next cell... Here's a script for the activator, we will call its variables from another script:scn ActivatorScript Begin OnActivate Player if iStage == 0 set Quest.iStage to 1 set Quest.fTimer to 12 ; You may want to play around with this - to refine it to your liking. imod FadeFromWhite12Sec endif endHere's the other script, just create a separate quest to manage the timer: scn QuestScript int iStage float fTimer Begin Gamemode if iStage == 1 if (fTimer > 0) set fTimer to fTimer - GetSecondsPassed else if (IsImageSpaceActive FadeFromWhite12Sec != 1) showMessage MyMessageBox set iStage to 2 endif endif endif end
amokrun1 Posted August 18, 2022 Author Posted August 18, 2022 Thanks, I'm going to try this tonight! Another question, how do I get time to pass during cell transition? For example, if it takes two hours to travel from cell A to cell B and I want the time once in cell B to reflect this(say 9am when in cell A, go through gate, emerge in cell B and it's 11am).
puddlepond Posted August 19, 2022 Posted August 19, 2022 (edited) you could add a "SetGameHour (GetCurrentTime + 2)" somewhere in the onactivate block. Edited August 19, 2022 by arsthetiu
amokrun1 Posted August 21, 2022 Author Posted August 21, 2022 How do I call the variables from the quest? It tells me istage is an unknown command.
Recommended Posts