MyTwisted0bsession Posted September 14, 2021 Share Posted September 14, 2021 I'm having a hard time wrapping my head around scripting and could really use some help.I'm trying to customize a forge, and I want a fire to light when the player (or an NPC) is smithing and go out again when they're done.So basically script-wise, I need an object linked to the crafting station to be enabled while the crafting station is in use, then be disabled again when not in use.I know how to enable/disable linked references, but I can't figure out how to trigger it. Any assistance would be greatly appreciated! Link to comment Share on other sites More sharing options...
dylbill Posted September 14, 2021 Share Posted September 14, 2021 You can attach a script to your furniture with the OnActivate event, like so: Scriptname MyFurnitureScript extends ObjectReference Event OnActivate(ObjectReference akActionRef) ;trigged when an NPC activates this object Self.GetLinkedRef().Enable() Utility.WaitMenuMode(1) While Self.IsFurnitureInUse(True) ;this while loop pauses the script until this furniture object is no longer being used. Utility.WaitMenuMode(1) EndWhile Self.GetLinkedRef().Disable() EndEventEDIT: Change the scriptname to something more unique Link to comment Share on other sites More sharing options...
MyTwisted0bsession Posted September 14, 2021 Author Share Posted September 14, 2021 This is exactly what I needed, thank you so much dylbill! :D Link to comment Share on other sites More sharing options...
dylbill Posted September 15, 2021 Share Posted September 15, 2021 No problem, happy modding :) Link to comment Share on other sites More sharing options...
Recommended Posts