Getting an item from a container?

Post » Mon Mar 14, 2011 11:28 pm

Hi,
is it possible to target a specific target from a container and remove it?
For example i have a container which contains weapons and i want to remove the first of them after checking its baseid and health.
User avatar
quinnnn
 
Posts: 3503
Joined: Sat Mar 03, 2007 1:11 pm

Post » Mon Mar 14, 2011 6:48 pm

Hi,
is it possible to target a specific target from a container and remove it?
For example i have a container which contains weapons and i want to remove the first of them after checking its baseid and health.


There is currently no way to get the health of an item in a container, even with NVSE. Also, if there are multiple of the same item, there is no way to pick a specific one.
User avatar
Harry Hearing
 
Posts: 3366
Joined: Sun Jul 22, 2007 6:19 am

Post » Mon Mar 14, 2011 7:02 pm

Get the ID of the first weapon in the container? i don't think that's possible.

Just do something like this

ContainerID.removeitem itemID 1
player.additem itemID 1
User avatar
Emma-Jane Merrin
 
Posts: 3477
Joined: Fri Aug 08, 2008 1:52 am

Post » Tue Mar 15, 2011 3:50 am

Another question: when i use a drop function on a container and the container doesn't contain the specified ObjectID or the specified count number what will happen then? Does the game crash or is the drop command simply ignored?
Example: a container named box1 contains 40 stimpaks and then box1.drop Caps001 9000 is called, what will happen?
Example 2: a container named box2 contains 40 stimpaks and then box2.drop stimpaks 9000 is called, what will happen?

*Edit*: tested it, working as intended. Trying to build a solution for me.
User avatar
Milagros Osorio
 
Posts: 3426
Joined: Fri Aug 25, 2006 4:33 pm


Return to Fallout: New Vegas