Supj517 Posted February 3, 2019 Share Posted February 3, 2019 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 More sharing options...
IsharaMeradin Posted February 3, 2019 Share Posted February 3, 2019 You need to use Activate to trigger the hidden container. An example: TheContainer.Activate(PlayerRef) ; activate container interface Link to comment Share on other sites More sharing options...
Supj517 Posted February 3, 2019 Author Share Posted February 3, 2019 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 undefinedD:\SteamLibrary\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\TIF__02001DB9.psc(9,26): variable PlayerRef is undefinedD:\SteamLibrary\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\TIF__02001DB9.psc(9,17): none is not a known user-defined typeNo 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 More sharing options...
IsharaMeradin Posted February 3, 2019 Share Posted February 3, 2019 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 More sharing options...
Supj517 Posted February 4, 2019 Author Share Posted February 4, 2019 (edited) Thank you for your answer. Looks like I have a lot to learn. I will try this once I have the time. Thank you again! Edited February 4, 2019 by Supj517 Link to comment Share on other sites More sharing options...
Recommended Posts