Zorkaz Posted December 25, 2019 Share Posted December 25, 2019 How do I make a placeable container that's linked to an NPC inventory?Is it possible?! Link to comment Share on other sites More sharing options...
InvokerGray Posted December 28, 2019 Share Posted December 28, 2019 Use a link with the keyword "Vendor container". Or something like that. Link to comment Share on other sites More sharing options...
pra Posted December 28, 2019 Share Posted December 28, 2019 What do you even mean by "linked to an NPC inventory"? Make the NPC's inventory accessible through the container? Or something different? Link to comment Share on other sites More sharing options...
Zorkaz Posted December 29, 2019 Author Share Posted December 29, 2019 Yep that's what I meant. For instance you open up a mailbox and have Cait's inventory up to use.I do think that somebody already made something similar but I can't find the post. Link to comment Share on other sites More sharing options...
DieFeM Posted December 29, 2019 Share Posted December 29, 2019 (edited) Instead of using an actual container, you can use an activator with a container model, and attach a new script to it: Event OnActivate(ObjectReference akActionRef) Actor LinkedActor = GetLinkedRef() As Actor If LinkedActor LinkedActor.OpenInventory(True) EndIf EndEventThen you need to link the actor to the container (activator), by adding the actor as a Linked ref in the properties of the container reference in the render window. Edited December 29, 2019 by DieFeM Link to comment Share on other sites More sharing options...
Zorkaz Posted December 29, 2019 Author Share Posted December 29, 2019 Ah, thanks. I will try that. Link to comment Share on other sites More sharing options...
Zorkaz Posted December 31, 2019 Author Share Posted December 31, 2019 1. Works perfectly when you place it in the worldspace thanks DieFeM :smile: 2. I wanted to change it into a constructible object so linking the reference will be different this time Then I added a property - type actor with cait as reference So the question is what do I need to change about the script? I tried different approaches but none worked. Link to comment Share on other sites More sharing options...
DieFeM Posted December 31, 2019 Share Posted December 31, 2019 Scriptname MBScriptCait extends ObjectReference Actor Property CaitRef Auto Event OnActivate(ObjectReference akActionRef) CaitRef.OpenInventory(True) EndEvent Link to comment Share on other sites More sharing options...
Zorkaz Posted December 31, 2019 Author Share Posted December 31, 2019 Ah it's that simple ;) It did the trick, thank you Link to comment Share on other sites More sharing options...
Recommended Posts