Find_Func

Category: Objects / Search
Since engine version: 4.9.6.0 CR

Description

Search criterion: finds all objects which return true to a call of the specified function. If the function is defined locally, the local function will be called, otherwiese a global function.

Syntax

array Find_Func (string strFunction,  ...);

Parameters

strFunction:
Function to call
...:
[opt] Parameters of the function

Remarks

Warning: never use this with a function which might have side effects. If your function may have side effects, do not use Find_Func but walk through the list of found objects instead.
For additional information on the use of this function see FindObjects.

Example

FindObjects(Find_Func("IsClonk"))
Returns all clonks of any types (including Hydroclonks, Mages...)
See also: FindObjects
Clonkonaut, Juli 2006