Jump to content

One-Way Containers


PositronicSpleen

Recommended Posts

I've been trying without luck to create a one-way container, one where the player can put things in but not take anything out. I thought about just having an ingestible that simply destroys an item in the player's inventory and makes a new one in the inaccessible container, but I have no idea how to select specific items out of the player's inventory; I'm not very experienced with scripting. Any help would be appreciated.
Link to comment
Share on other sites

I've been trying without luck to create a one-way container, one where the player can put things in but not take anything out. I thought about just having an ingestible that simply destroys an item in the player's inventory and makes a new one in the inaccessible container, but I have no idea how to select specific items out of the player's inventory; I'm not very experienced with scripting. Any help would be appreciated.

 

could go a couple ways i think.

 

you can make a script using (containerid).removeallitems (hidden container ID)

 

that would move everything from the accessable container into a container you place out of sight.

 

you could also use a trigger that runs a script that would

 

Short (item count of the item)

set short to player.getitemcount (ID of the item you want moved)

remove player.(id of item you want moved) itemcount

additem (containerid).(id of item you want moved) itemcount

 

depends on if you want to just have it store a specific item, or if you want the player to be able to put anything in it.

Link to comment
Share on other sites

You wouldn't happen to know if there's an elegant way to have the player be able to select a specific item in their inventory, do you? I was hoping to just activate an ingestible, select the item, and whisk it away, but I'll probably just use the RemoveAllItems function with some container. It seems strange that there is no way to transfer single items, or a simple way to get an inventory item ref.
Link to comment
Share on other sites

In this thread on the official forums, I recommended that he replace the FormID with an EditorRefID, and remove the "ref" variable, as I thought that using a FormID in a "set" command might be causing "safe" variable to be invalid, so calling Activate on it would cause a script halt.

 

PositronicSpleen replied that he followed my advice and added "some unrelated timing stuff", and that it now works.

 

Cipscis

Link to comment
Share on other sites

cheers, thanks

 

i try to get people to reveal their methods on here because when people keen on looking for answers do a forum search, theres usually alot of threads turning up with only questsions asked and no real answers to solutions :)

Link to comment
Share on other sites

Sorry for the double-post, but I think it's important that the thread by bumped because of this new information.

 

Quarn just posted in the thread on the official forums to say that containers can't be opened while the pip-boy is being put away, so the "unrelated timing stuff" probably took care of.

 

Cipscis

Link to comment
Share on other sites

  • Recently Browsing   0 members

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