Jump to content

How To Move Items Between NPC and Container?


Recommended Posts

As the title says, I'm trying to move items between an NPC and a container, via the same UI that is used to transfer items between the player and a container.  I'm attempting this from a dialogue script.  It's easy enough to cause the UI to appear if you want to transfer between player and container.

Function Fragment_1(ObjectReference akSpeakerRef)
  Actor akSpeaker = akSpeakerRef as Actor
  MyContainer.Activate(Game.GetPlayer())
EndFunction

It's not so easy for the transfer between NPC and container.  I've tried the following without success.

Function Fragment_1(ObjectReference akSpeakerRef)
  Actor akSpeaker = akSpeakerRef as Actor
  MyContainer.Activate(akSpeaker,true)
EndFunction

Can anybody point me in the right direction?

Link to comment

Have you actually seen another mod do this? I don't think I've come across a situation involving the inventory that did not use either the PCs inventory alone or the PCs inventory and another NPC or container. Which leads me to suspect that it may not be possible to do this in one step via manual inventory management.

 

Either the player will have to activate the NPC and take the items then activate the container to place them, or it would require a script to automate the transfer directly from NPC to container. You could script it to go through the PCs inventory, but that would be unnecessary work given the end result is the same.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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