Difference between revisions of "GetNearestObject"
From Dragon Age Toolset Wiki
(Generated by Sunjammer's Dragon Age Script Paser) |
BryanDerksen (Talk | contribs) (tidy up, remove tag) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
{{dafunction | {{dafunction | ||
|name=GetNearestObject | |name=GetNearestObject | ||
Line 6: | Line 5: | ||
|param1name=oObject | |param1name=oObject | ||
|param1desc=target Object | |param1desc=target Object | ||
+ | |param1default= | ||
|param2type=int | |param2type=int | ||
|param2name=nObjectType | |param2name=nObjectType | ||
|param2desc=type for the objects to query for their distance | |param2desc=type for the objects to query for their distance | ||
+ | |param2default=OBJECT_TYPE_ALL | ||
|param3type=int | |param3type=int | ||
|param3name=nNumberOfObjects | |param3name=nNumberOfObjects | ||
|param3desc=(optional) Number of objects to return | |param3desc=(optional) Number of objects to return | ||
+ | |param3default=1 | ||
|param4type=int | |param4type=int | ||
|param4name=nCheckLiving | |param4name=nCheckLiving | ||
|param4desc=(optional) only returns objects if they are alive | |param4desc=(optional) only returns objects if they are alive | ||
+ | |param4default=0 | ||
|param5type=int | |param5type=int | ||
|param5name=nCheckPerceived | |param5name=nCheckPerceived | ||
|param5desc=(optional) only returns objects if they are within the perception radius | |param5desc=(optional) only returns objects if they are within the perception radius | ||
+ | |param5default=0 | ||
|param6type=int | |param6type=int | ||
|param6name=nIncludeSelf | |param6name=nIncludeSelf | ||
− | |param6desc= | + | |param6desc=whether to include the target object |
− | |returntype=object | + | |param6default=0 |
− | |returndesc= | + | |returntype=object |
+ | |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