Difference between revisions of "GetNearestObjectByTag"
From Dragon Age Toolset Wiki
BryanDerksen (Talk | contribs) (Been a week without response, restoring the text in question.) |
BryanDerksen (Talk | contribs) (add the missing parameter and fix array return type) |
||
Line 1: | Line 1: | ||
− | |||
{{dafunction | {{dafunction | ||
|name=GetNearestObjectByTag | |name=GetNearestObjectByTag | ||
Line 31: | Line 30: | ||
|param7desc= | |param7desc= | ||
|param7default=0 | |param7default=0 | ||
− | |returntype=object | + | |returntype=object |
− | |returndesc= | + | |returnarra=yes |
+ | |returndesc=an array of objects meeting the criteria, sorted by distance from the target object | ||
|sourcefile=script.ldf | |sourcefile=script.ldf | ||
|sourcemodule= | |sourcemodule= | ||
Line 41: | Line 41: | ||
Returns N nearest object of a specific type, with a specifc tag | Returns N nearest object of a specific type, with a specifc tag | ||
− | Cite DavidSims: "GetNearestObjectByTag returns an array of all creatures in the current area | + | Cite DavidSims: "GetNearestObjectByTag returns an array of all creatures in the current area with the given tag, sorted by distance to the specificied object." |
<!-- == Remarks == --> | <!-- == Remarks == --> |
Latest revision as of 19:24, 9 February 2010
Returns N nearest object of a specific type, with a specifc tag
object[] GetNearestObjectByTag(
object oObject,
string sTag,
int nObjectType = OBJECT_TYPE_ALL,
int nNumberOfObjects = 1,
int nCheckLiving = 0,
int nCheckPerceived = 0,
int nIncludeSelf = 0
);
object oObject,
string sTag,
int nObjectType = OBJECT_TYPE_ALL,
int nNumberOfObjects = 1,
int nCheckLiving = 0,
int nCheckPerceived = 0,
int nIncludeSelf = 0
);
- Parameters:
- oObject
- target Object
- sTag
- Tag for the objects to query
- 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
- [Undocumented]
- Returns:
- an array of objects meeting the criteria, sorted by distance from the target object
- Source:
- script.ldf
Description
Returns N nearest object of a specific type, with a specifc tag
Cite DavidSims: "GetNearestObjectByTag returns an array of all creatures in the current area with the given tag, sorted by distance to the specificied object."