Creating a scene at a specific time

Post » Sun Nov 18, 2012 10:02 pm

Hey, working on my first quest. As part of the quest the player has to enter riftenmausoleum at 2am to meet with a mysterious stranger. This is stage 50 of an ongoing quest, the player has already met with an individual who has given them a note from someone else asking them to meet up at a specific place and time.

I'm just wondering how I go about checking the time is correct before running my scene?

I want the script to check if the player is entering the location at 2am and if they are, to run a scene. I figured I could do this by adding an SM Event Node Change Location Event and add conditions like GetQuestRunning, GetEventData & GetStageDone to make sure its the right quest and the right place etc.

But how do I make sure the time is correct? Is there a condition for that or do I need to script it seperately? If so how could I go about it?

Ideally the player will enter the mausoleum at between 2 am and 3 am and the script will check all the conditions and time are correct then advance to the next stage which will enable the placed actors in the cell (that are not there at any other time). The player will then be force greeted and the quest diologue trees open up ..

New to this so please try and give me enough info to google/self educate. Many thanks!
User avatar
Phoenix Draven
 
Posts: 3443
Joined: Thu Jun 29, 2006 3:50 am

Post » Mon Nov 19, 2012 5:04 am

You can see a full script that uses date/time here:

http://www.creationkit.com/Complete_Example_Scripts#A_helper_script_with_functions_to_get_the_current_moonphase.2C_sync_between_the_two_moons_and_day_of_the_week

(BTW: 1 = 1am and 13 = 1pm and 1.5 = 1:30am :wink:)


You may also find it in the list of native conditions for a QUEST STAGE (my CK is not open to check, but I think it may be there)


So yeah, you are about right with what you want to do ... And putting conditions on a Quest Stage that starts the scene is probably the easiest place to hang your tests (don't forget to code a PlanB ... "meet me tomorrow", or something ... if the Player is not there at 2am :wink:)
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Mon Nov 19, 2012 10:16 am

so .. what would the script look like do you think? I have no idea how to write code, but I am guessing the logic looks like this:

bool iscorrecttime
bool isnotcorrecttime
gametime = getcurrentgametime()
if gametime is between 1.5 and 2.5 then correctime == 1
else isnotcorrectime
if correctime == 1 setstage x (which contains the scene() to be launched)
?
I'm thinking since this script would be attached to a quest stage, it would be possible to set a condition of scene() to be stage x to prevent it happening more than once?

could someone help me turn that in to something approaching a workable papyrus script?

edit: actually no that wont work will it. sheesh.

I think what I need is a way to check if it is the correct time when the player enters a location and make that check condition for the stage progress?
User avatar
Ella Loapaga
 
Posts: 3376
Joined: Fri Mar 09, 2007 2:45 pm

Post » Sun Nov 18, 2012 11:52 pm

There's hundreds of ways to do it.

It depnds how you have everything setting up in preparation.

But the actual call you need is simply to check CurrentTime before you have the scene.start() command.

But, like I said, you also need to handle how your quest would continue if the player fails to be there at 2am.

Solving the little problem is easy enough ... the line of script is no problem. But you gotta set everything up first. How you do that is more important than the line of script.

You need to think backwards ... What event (player walking into a trigger box might do) kicks off the check that it is 2am (and presumably at 2am - if the player is where they should be) a package or Move command is given to the NPC who will go to meet the player.
User avatar
Melanie
 
Posts: 3448
Joined: Tue Dec 26, 2006 4:54 pm

Post » Mon Nov 19, 2012 8:06 am

I'd go for a trigger box. When it triggers, check the time. If the time is not right, ignore the trigger. Otherwise delete the box and set the quest stage to the one with the scene.

From there it should all be straight forward.
User avatar
clelia vega
 
Posts: 3433
Joined: Wed Mar 21, 2007 6:04 pm


Return to V - Skyrim