Jump to content

House resident dies, another moves in.


QaxeIsKaze

Recommended Posts

I've got a mod-town, and 1 of the houses is used in a short quest. Once the quest is over, the house becomes utterly useless. Since the town has only a few buildings in it, I've decided to recycle the house and have new "citizen" type npc move in. This part is taken care of at the end of the quest by enabling a set of items, disabling items from the quest, etc.

 

What I need help with is a little bit of script that will postpone the redecoration for a couple of game-days. Any ideas?

Edited by Ahondara
Link to comment
Share on other sites

I found something about "WaitGameTime" but I'm unclear how to plug it into my quest.

 

1 of the vanilla quests has this

MS12FollowUpStartDay.SetValueInt(GameDaysPassed.GetValueInt() + 3)

that is pointing to a GlobalVariable in the Aliases. I have no idea if I need anything that fancy.

 

Basically I want the quest to end, but I want the changes to the house to be made later using waitgametime or gamedayspassed.

Link to comment
Share on other sites

In the quest, add this script snippet at the end of the quest script.

 

RegisterForSingleUpdateGameTime ( 48 ) ;48 hours

Event OnUpdateGameTime()
; Put your changes here
EndEvent

 

Happy Yuletide.

Eck. :D

Link to comment
Share on other sites

You need to put the Event / EndEvent block outside the Function.

Sorry for the delay in replying, but Yuletide just ended and I was very drunk.;D

Link to comment
Share on other sites

Yuletide party sounds awesome. I'm off to a cyber-goth dance "thing" in Osaka tomorrow myself.

 

So, sorry but when you say "outside the function" I feel like I should grasp what you mean, but I really don't. My scripting experience goes back...about a month. I'm working on it, but could use another hint. All I did was this:

SetObjectiveCompleted(70)
RegisterForSingleUpdateGameTime ( 48 ) ;48 hours
Event OnUpdateGameTime()
Alias_Decorate.GetRef().Enable()
Alias_CleanUp.GetRef().Disable()
Alias_NewOwner1.GetRef().Enable()
Alias_NewOwner2.GetRef().Enable()
Alias_NewOwner3.GetRef().Enable()
EndEvent

How should this be reworded?

 

PS I'm glad your signature is the way it is, I just found 2 really useful mods!

Link to comment
Share on other sites

Ah, I see; what you’re doing is inside a quest fragment. Quest fragments are defined as functions and therefore can’t hold Events. You need to set the Event up in an actual Quest Script.

Go to the Quest form, the final tab is Scripts, add a new script here, and put the Event / EndEvent block in there. Don’t forget to declare all the variables you’re using as properties. You’ll need to modify the quest fragment using the kmyQuest window to address the update to the quest script by declaring kmyQuest as the quest script you’ve created. I think you need to change the update request to

kmyQuest.RegisterForSingleUpdateGameTime ( 48 )

but I don’t have access to my references atm to check. Either way, you need to send the update to the quest script, not the quest fragment.

 

Enjoy your cyber-goth dance "thing"; it sounds intruiging.

Eck. :D

 

PS I'm glad you like my work, enjoy my new year poem.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...