GasMaskGhoul Posted December 23, 2023 Posted December 23, 2023 Need a tutorial or document on how to do this. Chat GPT gave me this code but i dont know if this is useful or if there is another way of doing it. Scriptname QF_PackageScript extends ObjectReference Event OnActivate() ; Change the quest stage QF_Quest.SetStage(20) ; Add a delay of 24 in-game hours before the NPC starts traveling Game.GetPlayer().UpdateTravelWait(24) ; Start the NPC's package NPCRef.AddPackage(QF_Package) ; Remove this script instance Self.Disable() EndEvent
sen4mi Posted December 23, 2023 Posted December 23, 2023 The normal way of testing code to see if it works is to try it out in game. That said, I'm pretty sure that that instance of chatgpt conned you. Or, at least, I can't find any evidence that anyone has written an UpdateTravelWait function for fallout4, and even if they did, I suspect that calling it on the player wouldn't be the way to get it to work on the npc. You might try instead utility.WaitGameTime(24.0) before sending the npc on their way.
MorePrinniesDood Posted December 24, 2023 Posted December 24, 2023 Also worth looking at is RegisterForSingleUpdateGameTime() Say you want to quest to wait 24 hours at stage 20, then proceed to stage 30. In the stage 20 fragment, put a RegisterForSingleUpdateGameTime(24.0) Then attach this script to the quest as a whole: Quote ScriptName YourQuest extends quest Event OnUpdate() If (self.GetStage()==20) self.setstage(30) EndIf EndEvent
Andy14 Posted December 29, 2023 Posted December 29, 2023 On 12/23/2023 at 9:52 AM, GasMaskGhoul said: Need a tutorial or document on how to do this. Chat GPT gave me this code but i dont know if this is useful or if there is another way of doing it. Scriptname QF_PackageScript extends ObjectReference Event OnActivate() ; Change the quest stage QF_Quest.SetStage(20) ; Add a delay of 24 in-game hours before the NPC starts traveling Game.GetPlayer().UpdateTravelWait(24) ; Start the NPC's package NPCRef.AddPackage(QF_Package) ; Remove this script instance Self.Disable() EndEvent It would be surprising if it worked. Because UpdateTravelWait is not a known function (to me). 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now