Adding a Death Item List to a container

Post » Tue Nov 20, 2012 1:22 pm

Hey guys, wasn't sure if this would be a quick question.

I want to add a Death Item List to a container through a script. Is this possible? Something like:

ContainerName.AddItem(DeathItemList)

I'm not sure if that would work, because I don't know if it'll add all items or just one. I want all items a List would produce in an actor.

Thanks for the help as always :)
User avatar
Bee Baby
 
Posts: 3450
Joined: Sun Jun 18, 2006 4:47 am

Post » Tue Nov 20, 2012 8:29 am

CONT forms are never alive or dead, so there's no death event to trigger the LVLI's addition even if there were a death item slot (which there's not). WHat you could do is make an actor that behaves like a container (turn sneak detection off, etc) then kill it and it'll receive the death list. Might be easier to just add an item normally to a CONT form by other means.
User avatar
Georgia Fullalove
 
Posts: 3390
Joined: Mon Nov 06, 2006 11:48 pm

Post » Tue Nov 20, 2012 7:16 am

That a good suggestion mate but don't think it'll work. Ill explain what I'm doing :)

When an animal is killed, I have a script that removes all its items, and adds a new item, Carcass. Essentially changing its death item from hide etc to my item. This works great.

Player then crafts a pelt using the carcass. What I want is for the animals death items to them be added to the player. I can add an item easily, as I have an SM event set up already which runs a quest that updates a global.

I thought using AddItem for a levelled list might work, because you can AddItem a levelled item.

Any chance of me doing this? I think it's impossible to store the originally removed items somewhere as the player could kill numerous creatures before hitting the crafting station.
User avatar
James Baldwin
 
Posts: 3366
Joined: Tue Jun 05, 2007 11:11 am

Post » Tue Nov 20, 2012 1:11 am

I'll have to test tonight, but I suppose a work around if it can't be done, is spawning an actor somewhere, killing it, then transferring all its items to the player (which can be done, just seems like a lot of overhead lol).
User avatar
Noraima Vega
 
Posts: 3467
Joined: Wed Jun 06, 2007 7:28 am

Post » Tue Nov 20, 2012 1:26 am

Ok I tested it out and it works like a bloody charm.

You can do Player.AddItem(DeathList)
Or Container.AddItem(DeathList)

Or anything like that really. Works like a charm. It adds a normal random result of items you'd find in a dead animal to another object or the player :)
User avatar
Euan
 
Posts: 3376
Joined: Mon May 14, 2007 3:34 pm


Return to V - Skyrim