Discuss this page on this page's [[sysFindObject Talk Page|Talk Page]]
=== sysFindObject ===
See [[http://xelerus.de/index.php?s=functions&function=283|sysFindObject at Xelerus]]
^ Syntax | (sysFindObject spaceObject criteria) -> list |
^ Arguments | spaceObject: The space object in the system you want a list of space objects from. |
^ | criteria: The critieria for inclusion in the list. |
^ Returns | list: A list of all the space objects in the spaceObjects system that match the criteria. |
^ Category | [[0.99 functions|0.99]], [[spaceobject functions|spaceObject]], [[system functions|system]] |
^ Description | Returns a list of space objects in the system that match the criteria. |
G Stargates only
G:xyz; Stargate with ID 'xyz'
s Include ships
t Include stations (including planets)
T Include structure-scale stations
T:xyz; Include stations with attribute 'xyz'
A Active objects only (i.e., objects that can attack)
B:xyz; Only objects with attribute 'xyz'
D:xyz; Only objects with data 'xyz'
E Enemy objects only
F Friendly objects only
H Only objects whose base = source
M Manufactured objects only (i.e., no planets or asteroids)
N Return only the nearest object to the source
N:nn; Return only objects within nn light-seconds
O:docked; Ships that are currently docked at source
O:escort; Ships ordered to escort source
O:guard; Ships ordered to guard source
R:nn; Return only objects greater than nn light-seconds away
+xyz; Include objects with the given attribute
-xyz; Exclude objects with the given attribute
=== Example ===
(sysFindObject gPlayerShip "Ts")
Gives you a list of all structure-scale stations and ships.
[[http://transcendence.kronosaur.com/wiki/modding/xml/spaceobject#criteria|more detailed criteria]]
Return to [[:Functions]] list