The GetObjectByTag() NWScript command finds an object with the the indicated tag (specified as a string). It returns OBJECT_INVALID if no object was found. A common use for this command is to find an object with a unique tag (i.e. the object with the indicated tag), but it also handles multiple objects with the same tag. This command cannot be use to find the module object; use GetModule() instead. (All other types of objects can be found.)
Attributes | Values |
---|
rdfs:label
| |
rdfs:comment
| - The GetObjectByTag() NWScript command finds an object with the the indicated tag (specified as a string). It returns OBJECT_INVALID if no object was found. A common use for this command is to find an object with a unique tag (i.e. the object with the indicated tag), but it also handles multiple objects with the same tag. This command cannot be use to find the module object; use <a href="/mediawiki/GetModule" title="GetModule">GetModule</a>() instead. (All other types of objects can be found.)
- function GetObjectByTag (string sTag, int nNth=0) Get the nNth object with the specified tag.
* sTag:
* nNth: the nth object with this tag may be requested
* Returns OBJECT_INVALID if the object cannot be found.
* Note: The module cannot be retrieved by GetObjectByTag (), use GetModule () instead.
* Return type: object
* Include file: nwscriptdefn
|
dcterms:subject
| |
dbkwik:nwn2/proper...iPageUsesTemplate
| |
returns
| |
Name
| |
param
| |
param2default
| |
param2desc
| - Used when there are multiple objects with the same tag. Increasing this parameter causes a different object to be found.
|
param1desc
| - The tag of the object to locate.
|
dbkwik:nwn/property/wikiPageUsesTemplate
| |
abstract
| - The GetObjectByTag() NWScript command finds an object with the the indicated tag (specified as a string). It returns OBJECT_INVALID if no object was found. A common use for this command is to find an object with a unique tag (i.e. the object with the indicated tag), but it also handles multiple objects with the same tag. This command cannot be use to find the module object; use <a href="/mediawiki/GetModule" title="GetModule">GetModule</a>() instead. (All other types of objects can be found.)
- function GetObjectByTag (string sTag, int nNth=0) Get the nNth object with the specified tag.
* sTag:
* nNth: the nth object with this tag may be requested
* Returns OBJECT_INVALID if the object cannot be found.
* Note: The module cannot be retrieved by GetObjectByTag (), use GetModule () instead.
* Return type: object
* Include file: nwscriptdefn
|