Jump to content

Recommended Posts

Posted

What do you even mean by "linked to an NPC inventory"? Make the NPC's inventory accessible through the container? Or something different?

Posted

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.

Posted (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
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
Posted

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

Posted

Scriptname MBScriptCait extends ObjectReference

Actor Property CaitRef Auto

Event OnActivate(ObjectReference akActionRef)
CaitRef.OpenInventory(True)
EndEvent
  • Recently Browsing   0 members

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