nephlm Posted March 28, 2012 Share Posted March 28, 2012 Is there a script version of the console command showinventory? bookshelves essentially hook the additem and removeitem events to keep a separate copy of the contents of the container. I'd like to be able to iterate over the contents of a container to see what it contains, but there doens't seem to be a native call to see what's in a container. This may not be possible since arrays can only have 128 items in it, while containers don't have any such limit that I'm aware. So does anyone know of a way to see the contents of a container in a script? Link to comment Share on other sites More sharing options...
SinderionsBones Posted March 28, 2012 Share Posted March 28, 2012 you can see if something has a particular type of item, but to keep complete track you have to make your own separate list somehow by hooking the events. Those who do keep track this way have to remove everything, then replace it and track each event as it's replaced. Link to comment Share on other sites More sharing options...
nephlm Posted March 28, 2012 Author Share Posted March 28, 2012 you can see if something has a particular type of item, but to keep complete track you have to make your own separate list somehow by hooking the events. Those who do keep track this way have to remove everything, then replace it and track each event as it's replaced. Can you point me generally toward the calls that would tell if a container had an object of a certain type and how to remove everything. I only found calls to remove a specific form or ref. Thanks. Link to comment Share on other sites More sharing options...
fg109 Posted March 28, 2012 Share Posted March 28, 2012 GetItemCount to see if a container has a certain type of object, and RemoveAllItems to remove everything (and optionally place it in another container). Link to comment Share on other sites More sharing options...
Recommended Posts