jtgibson Posted March 3, 2010 Share Posted March 3, 2010 I'm curious as to whether it's possible to perform functions on all of the contents of a container without manually checking for each and every item using GetItemCount and executing the function in hard code. The idea I'm shooting for is that the player provides a selection of weapons into a "utility belt" container, and then each of the items in the container can be switched between with a simple tap of a hotkey. The utility belt is represented on the character with a simple dummy object (whose weight changes based on what the player puts in), while the container is just a persistent reference floating in nullspace. Putting items into the container is easy, as is opening the container remotely, but actually finding out what is in the container, and in which order, is non-trivial. There is a "201" parameter to GetFirstRef that says it is for inventory walking, but it is completely undocumented in any existing FOSE documentation on fose.silverlock.org, and I haven't found anything about it on Google. Anyone have more experience in this area? Is it limited to stepping through the player's inventory only? Link to comment Share on other sites More sharing options...
Cipscis Posted March 3, 2010 Share Posted March 3, 2010 Functions added since FOSE v1.1 haven't yet been included in the official documentation, but here's a post made by FOSE developer ianpatt that documents all these "missing" functions - Temporary Documentation For inventory walking, the functions that you want to use are GetNumItems and GetInventoryObject, along with Label and Goto to loop through them. Cipscis Link to comment Share on other sites More sharing options...
jtgibson Posted March 3, 2010 Author Share Posted March 3, 2010 Wunderbar! Thanks muchly. For anyone else who stumbles on this thread, drunken, with a twinkle in their eye, here's the most relevant information from ianpatt on that thread: http://www.bethsoft.com/bgsforums/index.ph...&p=15548430 int form.GetNumItems() - returns the number of items in a containerref form.GetInventoryObject(int idx) - returns the type of the specified item in the container Link to comment Share on other sites More sharing options...
Recommended Posts