Jump to content

Make a container linked to an NPC Inventory


Zorkaz

Recommended Posts

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
EndEvent

Then 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 by DieFeM
Link to comment
Share on other sites

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

 

7C8pTR7.png

 

Then I added a property - type actor with cait as reference

 

RgGiL8L.png

 

 

So the question is what do I need to change about the script? I tried different approaches but none worked.

 

KzsDTsR.png

Link to comment
Share on other sites

  • Recently Browsing   0 members

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