Functions Documentation | |
Name | objEnumItems |
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. |
Example |
(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 (January '25) |
Featured Mods (random) |
Captain's Log 3.1 |
Tractor Beam |
Quality Mods (random) |
Asteroid Scanner |
Light Carrier Playership |
Balanced Mods (random) |
Osaka Class Transport [In honor of Frontier 0.5] 1.1e |
"PDmod" ICX Overhaul |