Difference between revisions of "GetNearestObjectByTag"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Generated by Sunjammer's Dragon Age Script Paser)
 
(add the missing parameter and fix array return type)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Generated with errors}}
 
 
{{dafunction
 
{{dafunction
 
|name=GetNearestObjectByTag
 
|name=GetNearestObjectByTag
Line 6: Line 5:
 
|param1name=oObject
 
|param1name=oObject
 
|param1desc=target Object
 
|param1desc=target Object
 +
|param1default=
 
|param2type=string
 
|param2type=string
 
|param2name=sTag
 
|param2name=sTag
 
|param2desc=Tag for the objects to query
 
|param2desc=Tag for the objects to query
 +
|param2default=
 
|param3type=int
 
|param3type=int
 
|param3name=nObjectType
 
|param3name=nObjectType
 
|param3desc=type for the objects to query for their distance
 
|param3desc=type for the objects to query for their distance
 +
|param3default=OBJECT_TYPE_ALL
 
|param4type=int
 
|param4type=int
 
|param4name=nNumberOfObjects
 
|param4name=nNumberOfObjects
 
|param4desc=(optional) Number of objects to return
 
|param4desc=(optional) Number of objects to return
 +
|param4default=1
 
|param5type=int
 
|param5type=int
 
|param5name=nCheckLiving
 
|param5name=nCheckLiving
 
|param5desc=(optional) only returns objects if they are alive
 
|param5desc=(optional) only returns objects if they are alive
 +
|param5default=0
 
|param6type=int
 
|param6type=int
 
|param6name=nCheckPerceived
 
|param6name=nCheckPerceived
 
|param6desc=(optional) only returns objects if they are within the perception radius
 
|param6desc=(optional) only returns objects if they are within the perception radius
 +
|param6default=0
 
|param7type=int
 
|param7type=int
 
|param7name=nIncludeSelf
 
|param7name=nIncludeSelf
 
|param7desc=
 
|param7desc=
|returntype=object[]
+
|param7default=0
|returndesc=
+
|returntype=object
 +
|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 33: Line 40:
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
 
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 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
);
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."