Jump to content

[LE] Virtual inventory for custom follower. How?


Supj517

Recommended Posts

I want to add a virtual inventory to my custom follower. I want to make the "trade" dialogue open the container I've created to store things, not the follower's actual inventory since I don't want them equipping anything. Obviously I can't use akspeaker.openventory() in the script. Which script should I write to make them activate the container?

Link to comment
Share on other sites

So as I understand I put this line in the papyrus fragment box right?

*Name of Container*.Activate(PlayerRef)

 

D:\SteamLibrary\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\TIF__02001DB9.psc(9,0): variable LNsContainer is undefined

D:\SteamLibrary\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\TIF__02001DB9.psc(9,26): variable PlayerRef is undefined
D:\SteamLibrary\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\TIF__02001DB9.psc(9,17): none is not a known user-defined type
No output generated for TIF__02001DB9, compilation failed.
I got these errors. What did I do wrong?
Do I have to write in something instead of PlayerRef?
LNsContainer is the name of the satchel I made. Should I change the name? Change it into a chest? Put it somewhere in the world?
I am very new to scripting in CK as you can see....
Link to comment
Share on other sites

You need to define your variables. Papyrus has no clue what they mean. This usually means the use of properties. In the case of your container, it will need to be. For the player, in a single use situation you can use Game.GetPlayer() instead of a variable. Also, the container used needs to be placed in the game world somewhere, even if all you do is put it in a new empty isolated cell. Also assign the pre-placed instance of the container to an ObjectReference variable.

 

Since you are working with a topic info fragment, you will need to compile the script with a single semi-colon ";" first before you can add any properties. It is a quirk of the CK that the fragment script must exist prior to adding properties to the record that has the script attached. You can also comment out your code with the semi-colon in front of each line then compile. After the script is initially created you can add your properties and remove any semi-colons that you need and once again compile.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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