GetCurrentGameTime...every day?

Post » Sun Jun 17, 2012 8:01 pm

I'm planning a companion mod that will make it so that the NPC cannot be married unless he's been your follower for X days. I think I have a basic idea of how to set this up with quests and dialogue, but I believe I'll also need a script to check how long he's been your follower.

I don't have it scripted properly at all yet (haven't scripted anything in years, relearning the process), but basically I *think* the logical steps would be something as follows:

When SetPlayerTeammate first fires:
StartDating=GetCurrentGameTime.

Every day, check GetCurrentGameTime-StartDating.

While (GetCurrentGameTime-StartDating<21)
setstage QuestCan'tBeMarriedYet 10

When (GetCurrentGameTime-StartDating=21)
setstage QuestCan'tBeMarriedYet 20 (or finish quest, whatever.)

The part I haven't found/figured out yet is how to run the GetCurrentGameTime-StartDating check every in-game day, or how the game calculates days passed while waiting, that sort of thing.

Help? Thoughts? Suggestions on what might work better?
User avatar
El Khatiri
 
Posts: 3568
Joined: Sat Sep 01, 2007 2:43 am

Post » Sun Jun 17, 2012 2:19 pm

Reading through some other topics in here has prompted me to wonder if cuing the script to run If Hour = 0 would work, or if I'd be setting myself up for problems with waiting/sleeping.
User avatar
emma sweeney
 
Posts: 3396
Joined: Fri Sep 22, 2006 7:02 pm


Return to V - Skyrim