Jump to content

[LE] Script for buying a home


Recommended Posts

OK so I decided to use a script created by DarkFox127 for the home upgrade portion of my mod. But I'd like to add the feature that once all upgrades have been made the workbench disappears. Does anyone know how to add that to the following script?

Scriptname MarasRespiteCraftUpgrades extends ObjectReference
{Removes the crafted item, passes time and then enables specified item}

ObjectReference Property EnableRef_01 Auto
{One of the references to be enabled}
{Repeat as needed}

GlobalVariable Property Global_TS Auto
{The global variable which determines wether or not to show the time screens}
GlobalVariable Property GameHour Auto
{The global for current time in game}

Float Property Time Auto
{The amount of game time which is forced to pass}

MiscObject Property CraftItem Auto
{This targets the item the script is attached to so it may be removed from your inventory}

Event OnContainerChanged(ObjectReference akNewContainer,ObjectReference akOldContainer)

If(Global_TS.GetValue()==1)
TS()
Else
Game.FadeOutGame(false, true,2.0, 1.0)
EndIf

GameHoure.SetValue(GameHour.GetValue()+Time)
EnableAll()
Game.GetPlayer().RemoveItem(CraftItem,1,True)
Return

EndEvent

Function TS()

IfTime == 1
Game.PlayBink("YOURBINKNAME_01.bik")
ElseIfTime == 2
Game.PlayBink("YOURBINKNAME_02.bik")
{Repeat as needed}

EndIf

EndFunction

Function EnableAll()

EnableRef_01.enable()
{Repeat as needed}

EndFunction

 

 

By the way I haven't tested this script in game yet.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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