Script Event for removing a specific item from NPC?

Post » Tue Dec 23, 2014 11:08 am

Hi! I'm looking to have a script execute when a specific item is looted from a dead NPCs inventory. In this case, specifically animal pelts.

I don't want to run a script every time any item is looted, and run a check of whether it is the item I want. I would much rather attach a script to the item itself, and only run when it's looted.

Is there an event handler for items, similar to the NPC OnDeath, that only runs when they are looted? If not, could I make a new Event type?

Thank you!

EDIT: This is looking close to what I want, trying to determine if "container" includes NPC inventory: http://www.creationkit.com/OnItemRemoved_-_ObjectReference

User avatar
roxanna matoorah
 
Posts: 3368
Joined: Fri Oct 13, 2006 6:01 am

Post » Tue Dec 23, 2014 8:01 am

yes, you found just what you were looking for.

if you want to catch just one specific item, you might also want to take a look into http://www.creationkit.com/AddInventoryEventFilter_-_ObjectReference

User avatar
Scared humanity
 
Posts: 3470
Joined: Tue Oct 16, 2007 3:41 am


Return to V - Skyrim