|Syntax||(objEnumItems obj criteria itemVar exp) -> value of last expression|
|Argument List||obj: The spaceObject whose items will be enumerated over.
criteria: The criteria of the items you want from the spaceObject.
itemVar: Name of the variable that will be used to hold the current item of the enumeration.
exp: The expression you want to evaluate for each item on the spaceObject matching the criteria. The item will be available inside the expression under the name you used in 'itemVar'.
|Returns||What the last expression in the iteration returns. In general the return value of an enumeration is not really interesting.|
|Category||item, spaceobject, iteration|
|Description||Allows you to run some code on every item on an object, one at a time. You can limit which items to enumerate over by using item criteria.
Iterates through the items in the space object that match the criteria. The variable will be available inside the function, holding the current item for each iteration.
(objEnumItems gPlayerShip "*wI" instWeap (dbgOutput (itmGetName instWeap 0)) )
Outputs the name of all the installed weapons of the players ship to the debug console.
|Comment||Like all iteration functions very helpful for looping over a list of elements, in this case it is through the item list of a spaceObject.|
|Mod of the Month (February '17)|
|[Pre-Alpha] Oracus and Domina I: The March of the Heretic|
|Transcendence 1.7 XML _Source|