Find package and items inside containers/bodies.

Post » Fri May 13, 2011 6:27 pm

The find package is bothering me =/

I have a script that chucks an item with an onAdd script into all corpses and containers in a given area and then adds a find package to the NPCs which makes them seek out the items I added to the corpses. This works for containers , the NPC's have no problem finding the items on the containers and picking them up, but they ignore the corpses.

Any ideas what I might be doing wrong or how to get around this? (The onAdd script has an exception to check it's only being picked up by a valid searcher, not triggering and deleting itself when "onAdded" into the container or corpse.



Edit Nevermind, it was because they're considering it stealling from each other. Using a completely different species of NPC for testing with no shared faction made it work.
User avatar
Heather Kush
 
Posts: 3456
Joined: Tue Jun 05, 2007 10:05 pm

Post » Fri May 13, 2011 3:48 pm

Bump

Nope, seems I wasn't imagining it, there really is something wrong with the Find package. I set up an experiment to confirm my observations. I added an NPC corpse, a creature corpse and a container to a room. I put a piece of Ambrosia in each of the objects and created a rat with a custom AI package instructing it to "find" 3 pieces of Ambrosia.

http://www.youtube.com/watch?v=6_9lr6YbFuc

The video confirms my suspicion. The rat correctly loots the Argonian corpse and the container, but ignores the Ambrosia on the Baliwog's corpse; bizarrely the rat bothers to walk up to the corpse but doesn't take the ambrosia. Any ideas how I'm gonna get around this without resorting to juggling persistant reference activators? - I need to find a way to get some random NPCs to loot all corpses and containers; my current framework is based on dumping a bunch've hidden misc items that "onAdd" their previous container's contents onto the inventory of the (suitable) NPC who picked them up and then using a "find" package to grab them.

Persistant reference activators don't seem viable as some areas will inevitably have quite large numbers of corpses, especially with mods like MMM running, and without SOMETHING to act as a package target I can't get the mobs to walk over to the container or corpse and interact with it...
User avatar
Victoria Vasileva
 
Posts: 3340
Joined: Sat Jul 29, 2006 5:42 pm


Return to IV - Oblivion