Difference between revisions of "GetNearestObject"
From Dragon Age Toolset Wiki
BryanDerksen (Talk | contribs) m (1 revision: re-import with default parameter value parameters set) |
BryanDerksen (Talk | contribs) (tidy up, remove tag) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
{{dafunction | {{dafunction | ||
|name=GetNearestObject | |name=GetNearestObject | ||
Line 25: | Line 24: | ||
|param6type=int | |param6type=int | ||
|param6name=nIncludeSelf | |param6name=nIncludeSelf | ||
− | |param6desc= | + | |param6desc=whether to include the target object |
|param6default=0 | |param6default=0 | ||
− | |returntype=object | + | |returntype=object |
− | |returndesc= | + | |returndesc= N nearest objects that match the criteria |
+ | |returnarra=yes | ||
|sourcefile=script.ldf | |sourcefile=script.ldf | ||
|sourcemodule= | |sourcemodule= |
Latest revision as of 22:14, 9 February 2010
Returns N nearest objects of a specific type
object[] GetNearestObject(
object oObject,
int nObjectType = OBJECT_TYPE_ALL,
int nNumberOfObjects = 1,
int nCheckLiving = 0,
int nCheckPerceived = 0,
int nIncludeSelf = 0
);
object oObject,
int nObjectType = OBJECT_TYPE_ALL,
int nNumberOfObjects = 1,
int nCheckLiving = 0,
int nCheckPerceived = 0,
int nIncludeSelf = 0
);
- Parameters:
- oObject
- target Object
- nObjectType
- type for the objects to query for their distance
- nNumberOfObjects
- (optional) Number of objects to return
- nCheckLiving
- (optional) only returns objects if they are alive
- nCheckPerceived
- (optional) only returns objects if they are within the perception radius
- nIncludeSelf
- whether to include the target object
- Returns:
- N nearest objects that match the criteria
- Source:
- script.ldf
Description
Returns N nearest object of a specific type