Checking a cell on entering for a specific item count: Is it

Post » Mon Jun 18, 2012 10:49 pm

I was wondering if, through Papyrus scripting, when the character is entering an area, is possible to check for the number of instances of a specific item which are within it...is it possible?
If it's possible, is also possible to have it check into the inventory of actors within that cell? If the script did that, it will check also on the player's inventory, right?
And also...it's possible for a script to count the number of NPC actors within that region? And that would count the player in?
Would be possible to attach the script to a specific (non-interior) cell...such as the cell of a specific hold? That would create a "regional script"...I mean...a script which would start on entering a specific "region" of the game, right?

And...is is possible to launch a script on leaving a regional cell?

Do you think that such scripts would be taxing for the system or could be easily performed?
Thanks,
Guido
User avatar
Sammygirl500
 
Posts: 3511
Joined: Wed Jun 14, 2006 4:46 pm

Post » Tue Jun 19, 2012 4:41 am

Whether these are taxing or not depend really on how often they are being done. Typically scripts like this have to run through every thing in a cell and check if it is the thing it is looking for, which is a bit expensive, yes.

As for the possibility of these things, the number of items, I'm really not sure. In Oblivion, I know you could run through the inventories of every NPC in a cell, and the player's too, of course, but this may have likely been thanks to OBSE. To see if a cell can have a script, I'd try right clicking one and looking through its properties.

It is definitely possible to have an object that has a script on it in a cell that runs every time the object's containing cell is fully loaded.
User avatar
Ymani Hood
 
Posts: 3514
Joined: Fri Oct 26, 2007 3:22 am


Return to V - Skyrim