ThatSinisterGuy Posted October 6, 2017 Share Posted October 6, 2017 (edited) If you're still trying to figure this out, here's a function I made recently to pass game time: Function AdvanceGameTime(int HoursToPass) if (HoursToPass <= 0) HoursToPass = 1 EndIf GlobalVariable GameHr GameHr = Game.GetForm(0x00000038) as GlobalVariable float t = GameHr.GetValue() GameHr.SetValue(t + HoursToPass) Debug.Notification(HoursToPass + " hours have passed") EndFunction The form 0x00000038 is the GameHour global variable. You should reference it properly with a property in the script, I used the GetForm function out of laziness (didn't feel like adding a property then having to set the value on near 600 forms). Edited October 6, 2017 by NeonfireModding Link to comment Share on other sites More sharing options...
SaulieSaul Posted October 6, 2017 Author Share Posted October 6, 2017 Awesome!! Thank you for helping me! So to advance the game hours by 6, I would set HoursToPass = 6?And should I add this line to my teleport script? or add this as a second script to my activator?This is the teleport script I was given.... Scriptname whatevernameScript extends ObjectReference ObjectReference Property TargetLocation Auto;TargetLocation is Xmarker on boat being sailed toEvent OnActivate(ObjectReference akActionRef) Game.GetPlayer().MoveTo(TargetLocation) Game.EnableFastTravel() Game.FastTravel(TargetLocation)EndEventThank you for taking time to help me! Link to comment Share on other sites More sharing options...
SaulieSaul Posted October 26, 2017 Author Share Posted October 26, 2017 (edited) Hey there internets :D I thought I would end this thread with good news. Thanks to NeonfireModding for the end product! And of course anyone who was kind enough to take time and help me. :smile: If you find this script useful, give NeonfireModding a shout ;P Or at least have a browse of his mod offerings :smile:So, here is the script..Teleport to XMarker Heading with time passing value of 8 hours Scriptname whatevernameScript extends ObjectReference ObjectReference Property TargetLocation Auto;TargetLocation is Xmarker on boat being sailed to Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().MoveTo(TargetLocation) AdvanceGameTime(8) EndEvent Function AdvanceGameTime(int HoursToPass) if (HoursToPass <= 0) HoursToPass = 8 EndIf GlobalVariable GameHr GameHr = Game.GetForm(0x00000038) as GlobalVariable float t = GameHr.GetValue() GameHr.SetValue(t + HoursToPass) Debug.Notification(HoursToPass + " hours have passed")EndFunctionThanks again everyone! Edited October 27, 2017 by SaulieSaul Link to comment Share on other sites More sharing options...
SaulieSaul Posted October 27, 2017 Author Share Posted October 27, 2017 (edited) :Duplicate Post Deleted" Edited October 27, 2017 by SaulieSaul Link to comment Share on other sites More sharing options...
SaulieSaul Posted October 5, 2020 Author Share Posted October 5, 2020 Refined Script Version : Activator To X Marker Heading With Game Time Passing Teleport Script (Adjust Values in Properties) Scriptname MYSCRIPT extends ObjectReference Actor Property Player AutoObjectReference Property TargetxMarkerHeading AutoFloat Property TimeToPass AutoGlobalVariable Property GameHour Auto Event OnActivate(ObjectReference AkActionRef)if AkActionRef == PlayerGameHour.Mod(TimeToPass) Player.MoveTo(TargetxMarkerHeading) Game.EnableFastTravel()Game.FastTravel(TargetxMarkerHeading)endifEndEvent Link to comment Share on other sites More sharing options...
dylbill Posted October 5, 2020 Share Posted October 5, 2020 I do something similar with my Super Fast Input Wait Menu mod. You can use GlobalVariable.Mod instead: GlobalVariable Property GameHour Auto Function AdvanceTime(Int Days, Int hours) If Days > 0 Int I = 0 While I < Days I += 1 GameHour.Mod(24) ;advance time by 1 day EndWhile Endif If Hours > 0 && Hours <= 24 ;cannot mod game hour by more than 24 GameHour.Mod(Hours) EndIf EndFunction Event OnActivate(ObjectReference akActionRef) AdvanceTime(2, 6) ;Advance time by 2 days and 6 hours Endevent Link to comment Share on other sites More sharing options...
Recommended Posts