Jump to content

Photo

Virtual inventory for custom follower. How?

follower custom follower creation kit modding

  • Please log in to reply
4 replies to this topic

#1
Supj517

Supj517

    Stranger

  • Members
  • Pip
  • 6 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?



#2
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,987 posts

You need to use Activate to trigger the hidden container.

 

An example:

TheContainer.Activate(PlayerRef)									; activate container interface


#3
Supj517

Supj517

    Stranger

  • Members
  • Pip
  • 6 posts

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....


#4
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,987 posts

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.



#5
Supj517

Supj517

    Stranger

  • Members
  • Pip
  • 6 posts

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 by Supj517, 04 February 2019 - 07:18 AM.






Also tagged with one or more of these keywords: follower, custom follower, creation kit, modding

Page loaded in: 1.158 seconds