openclonk/docs/sdk/script/fn/Find_Category.xml

37 lines
1.4 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>Find_Category</title>
<category>Objects</category>
<subcat>Search</subcat>
<version>5.1 OC</version>
<syntax>
<rtype>array</rtype>
<params>
<param>
<type>int</type>
<name>category</name>
<desc>Object category of the objects to find.</desc>
</param>
</params>
</syntax>
<desc>Search criterion: finds all objects of the specified category.</desc>
<remark>For additional information on the use of this function see <funclink>FindObjects</funclink>.</remark>
<examples>
<example>
<code><funclink>FindObjects</funclink>(Find_Category(<funclink>C4D_Structure</funclink>))</code>
<text>Returns a list of all buildings.</text>
</example>
<example>
<code><funclink>FindObjects</funclink>(Find_Category(<funclink>C4D_Rule</funclink> | <funclink>C4D_Goal</funclink>))</code>
<text>Returns all active goal and rule objects. Notice that categories can be combined using "|". This will find all objects which fulfill at least one of the categories.</text>
</example>
</examples>
<related><funclink>FindObjects</funclink></related>
</func>
<author>Clonkonaut</author><date>2006-07</date>
</funcs>