While aiIteration < 1000 aiIteration += 1 fTimePassed = GameDaysPassed.GetValue() Time Elapsed: 0.014999 (GameDaysPassed.Value fared just as well)EndWhile While aiIteration < 1000 aiIteration += 1 fTimePassed = Utility.GetCurrentGameTime() Time Elapsed: 14.569000EndWhile.takes approximately 1,000 times longer than. Why not use the function? It does exactly the same thing as that Global, and saves you a property declaration. Scriptname PlayerVampireNeedsQuestScript extends QuestGlobalVariable Property GameDaysPassed AutoFloat Property LastCoffinSleepTime AutoFloat Property HowLongWithoutCoffinSleep AutoFloat Property CurrentGameTime Auto prolly need vampire quest extends hereEvent OnInit()RegisterForSingleUpdate(0.1)RegisterForSleep()EndEventEvent OnUpdate()RegisterForSingleUpdate(15) this is definitely secondsCurrentGameTime = ("current game time is" +CurrentGameTime)EndEventEvent OnSleepStop(bool abInterrupted)if abInterrupted Debug.Trace("Player was woken by something!") LastCoffinSleepTime = GameDaysPassed.Valueelse Debug.Trace("Player woke up naturally") LastCoffinSleepTime = GameDaysPassed.ValueendIfendEvent Obviously I don't have that logic in there yet, as I'm still trying to grasp how to do a timer properly in Skyrim. Ultimately I want to set the time I went to sleep in that event onSleepStart in my float LastCoffinSleepTime, and then in my OnUpdate event, add how much time has passed since that time. Shouldn't it be a game time or something, like how many days I've been playing this character? Right now I'm trying to set my float CurrentGameTime to GameDaysPassed.Value, yet it keeps returning 0.0. Granted all the details are not in there yet, but I want to get the timer working first, then I'll add in the detrimental effects for not spending time in your coffin, and bonuses for doing so, etc etc. Ok so I'm trying to track how long its been since my nasty bloodsvcker has napped in his coffin.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |