Container Target References: Difference between revisions

From HLKitWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 8: Line 8:
|class="leftnormal"|live
|class="leftnormal"|live
|(Read-Only) Returns non-zero if the container is currently considered "live", else zero if non-live. The live state for a gizmo is dictated by the live state of its parent pick that attaches it, while a hero is always considered live.<br>
|(Read-Only) Returns non-zero if the container is currently considered "live", else zero if non-live. The live state for a gizmo is dictated by the live state of its parent pick that attaches it, while a hero is always considered live.<br>
Example: this.live
Example: result = this.live
|-
|-
|ishero
|ishero
|(Read-Only) Returns non-zero if the container is a hero, else zero for a gizmo.<br>
|(Read-Only) Returns non-zero if the container is a hero, else zero for a gizmo.<br>
Example: this.ishero
Example: result = this.ishero
|-
|-
|isactive
|isactive
|(Read-Only) Returns non-zero if the container either is or resides within the currently active actor within the HL interface. If the container is or resides within a different actor, zero is returned.<br>
|(Read-Only) Returns non-zero if the container either is or resides within the currently active actor within the HL interface. If the container is or resides within a different actor, zero is returned.<br>
Example: this.isactive
Example: result = this.isactive
|-
|-
|livename
|livename
|(Read-Only) Returns a suitable name for the container that is based on dynamic changes made via scripts. If the container is an actor, the name of the actor is returned, else the name of the parent pick of the gizmo is returned.<br>
|(Read-Only) Returns a suitable name for the container that is based on dynamic changes made via scripts. If the container is an actor, the name of the actor is returned, else the name of the parent pick of the gizmo is returned.<br>
Example: this.livename
Example: result = this.livename
|-
|-
|actorname
|actorname
|(Read-Only) Returns the name of the actor that encompasses the current container context. The name is whatever has been assigned by the user.<br>
|(Read-Only) Returns the name of the actor that encompasses the current container context. The name is whatever has been assigned by the user.<br>
Example: this.actorname
Example: result = this.actorname
|-
|-
|playername
|playername
|(Read-Only) Returns the name of the player that is associated with the current lead. The name is whatever has been entered by the user.<br>
|(Read-Only) Returns the name of the player that is associated with the current lead. The name is whatever has been entered by the user.<br>
Example: this.playername
Example: result = this.playername
|-
|-
|assign[''tag'']
|assign[''tag'']
|(Read-Only) Assigns the indicated ''tag'' to the container. The tag must be specified using the standard "group.id" syntax. The tag is verified to exist during compilation of the script. Always returns a value of zero.<br>
|(Read-Only) Assigns the indicated ''tag'' to the container. The tag must be specified using the standard "group.id" syntax. The tag is verified to exist during compilation of the script. Always returns a value of zero.<br>
Example: this.assign[skill.appraise]
Example: perform this.assign[skill.appraise]
|-
|-
|delete[''tmpl'']
|delete[''tmpl'']
|(Read-Only) Deletes all tags from the container that match the tag template ''tmpl''. The template must use the standard "group.id" syntax and may contain a wildcard. If the template employs a wildcard, all tags matching the template are deleted. If the template specifies an explicit tag, and the tag has been assigned to the container multiple times, the tag is deleted only once, thereby providing detailed control to authors when needed. Always returns a value of zero.<br>
|(Read-Only) Deletes all tags from the container that match the tag template ''tmpl''. The template must use the standard "group.id" syntax and may contain a wildcard. If the template employs a wildcard, all tags matching the template are deleted. If the template specifies an explicit tag, and the tag has been assigned to the container multiple times, the tag is deleted only once, thereby providing detailed control to authors when needed. Always returns a value of zero.<br>
Example: this.delete[skill.craft?]
Example: perform this.delete[skill.craft?]
|-
|-
|assignstr[''str'']
|assignstr[''str'']
|(Read-Only) This target reference is identical to "assign", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag to be dynamically determined via the script instead of being hard-wired at compilation. Always returns a value of zero.<br>
|(Read-Only) This target reference is identical to "assign", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag to be dynamically determined via the script instead of being hard-wired at compilation. Always returns a value of zero.<br>
Example: this.assignstr[skill.appraise]
Example: perform this.assignstr[skill.appraise]
|-
|-
|deletestr[''str'']
|deletestr[''str'']
|(Read-Only) This target reference is identical to "delete", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation. Always returns a value of zero.<br>
|(Read-Only) This target reference is identical to "delete", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation. Always returns a value of zero.<br>
Example: this.deletestr["skill.craft?"]
Example: perform this.deletestr["skill.craft?"]
|-
|-
|tagis[''tmpl'']
|tagis[''tmpl'']
Line 52: Line 52:
|tagcount[''tmpl'']
|tagcount[''tmpl'']
|(Read-Only) Returns the number of tags assigned to the container that match the tag template ''tmpl''. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
|(Read-Only) Returns the number of tags assigned to the container that match the tag template ''tmpl''. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
Example: this.tagcount[skill.?]
Example: result = this.tagcount[skill.?]
|-
|-
|tagvalue[''tmpl'']
|tagvalue[''tmpl'']
|(Read-Only) Returns the value of a tag assigned to the container that matches the tag template ''tmpl''. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
|(Read-Only) Returns the value of a tag assigned to the container that matches the tag template ''tmpl''. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
Example: this.tagvalue[spelllevel.wizard?]
Example: result = this.tagvalue[spelllevel.wizard?]
|-
|-
|tagmin[''tmpl'']
|tagmin[''tmpl'']
|(Read-Only) Returns the minimum value of all tags assigned to the container that match the tag template ''tmpl''. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
|(Read-Only) Returns the minimum value of all tags assigned to the container that match the tag template ''tmpl''. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
Example: this.tagmin[spelllevel.wizard?]
Example: result = this.tagmin[spelllevel.wizard?]
|-
|-
|tagmax[''tmpl'']
|tagmax[''tmpl'']
|(Read-Only) Returns the maximum value of all tags assigned to the container that match the tag template ''tmpl''. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
|(Read-Only) Returns the maximum value of all tags assigned to the container that match the tag template ''tmpl''. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
Example: this.tagmax[spelllevel.wizard?]
Example: result = this.tagmax[spelllevel.wizard?]
|-
|-
|tagunique[''tmpl'']
|tagunique[''tmpl'']
|(Read-Only) Returns the number of unique tags assigned to the container that match the tag template ''tmpl''. If a tag is assigned multiple times, it is only counted once. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
|(Read-Only) Returns the number of unique tags assigned to the container that match the tag template ''tmpl''. If a tag is assigned multiple times, it is only counted once. The template must use the standard "group.id" syntax and may contain a wildcard.<br>
Example: this.tagunique[skill.?]
Example: result = this.tagunique[skill.?]
|-
|-
|tagexpr[''expr'']
|tagexpr[''expr'']
|(Read-Only) Returns non-zero if the tags assigned to the container match the tag expression ''expr'', else zero is returned. The ''expr'' parameter must be a valid tag expression.<br>
|(Read-Only) Returns non-zero if the tags assigned to the container match the tag expression ''expr'', else zero is returned. The ''expr'' parameter must be a valid tag expression.<br>
Example: this.tagexpr[class.wizard & (val:spelllevel.wizard? > 5)]
Example: result = this.tagexpr[class.wizard & (val:spelllevel.wizard? > 5)]
|-
|-
|tagcountstr[''str'']
|tagcountstr[''str'']
|(Read-Only) This target reference is identical to "tagcount", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
|(Read-Only) This target reference is identical to "tagcount", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
Example: this.tagcountstr["skill.?"]
Example: result = this.tagcountstr["skill.?"]
|-
|-
|tagvaluestr[''str'']
|tagvaluestr[''str'']
|(Read-Only) This target reference is identical to "tagvalue", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
|(Read-Only) This target reference is identical to "tagvalue", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
Example: this.tagvaluestr["spelllevel.wizard?"]
Example: result = this.tagvaluestr["spelllevel.wizard?"]
|-
|-
|tagminstr[''str'']
|tagminstr[''str'']
|(Read-Only) This target reference is identical to "tagmin", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
|(Read-Only) This target reference is identical to "tagmin", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
Example: this.tagminstr["spelllevel.wizard?"]
Example: result = this.tagminstr["spelllevel.wizard?"]
|-
|-
|tagmaxstr[''str'']
|tagmaxstr[''str'']
|(Read-Only) This target reference is identical to "tagmax", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
|(Read-Only) This target reference is identical to "tagmax", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
Example: this.tagmaxstr["spelllevel.wizard?"]
Example: result = this.tagmaxstr["spelllevel.wizard?"]
|-
|-
|taguniquestr[''str'']
|taguniquestr[''str'']
|(Read-Only) This target reference is identical to "tagunique", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
|(Read-Only) This target reference is identical to "tagunique", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.<br>
Example: this.taguniquestr["skill.?"]
Example: result = this.taguniquestr["skill.?"]
|-
|-
|tagexprstr[''str'']
|tagexprstr[''str'']
|(Read-Only) This target reference is identical to "tagexpr", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag expression to be dynamically determined via the script instead of being hard-wired at compilation.<br>
|(Read-Only) This target reference is identical to "tagexpr", except that the ''str'' parameter is a string expression that is evaluated within the script. This allows the tag expression to be dynamically determined via the script instead of being hard-wired at compilation.<br>
Example: this.tagexprstr["class.wizard & (val:spelllevel.wizard? > 5)"]  
Example: result = this.tagexprstr["class.wizard & (val:spelllevel.wizard? > 5)"]  
|-
|-
|tagmatch[''refgrp'',''match'',''ref'']
|tagmatch[''refgrp'',''match'',''ref'']
Line 169: Line 169:
|weight
|weight
|(Read-Only) Returns the total weight of all "gear" picks within the container.<br>
|(Read-Only) Returns the total weight of all "gear" picks within the container.<br>
Example: "result = this.weight".
Example: result = this.weight
|-
|-
|gearlist[''delim'',''expr'']
|gearlist[''delim'',''expr'']

Revision as of 12:57, 5 December 2008

Context: HL Kit &#133; Kit Reference &#133; Target References 

There are a wide assortment of operations that can be performed on containers, some of which modify the container and some that simply retrieve information about the container. The complete list of these operations is presented in the table below.

NOTE! When a container is accessed from within a visual script, all operations are restricted to read-only behavior. Any attempts to modify a container from within a visual script will fail.

live (Read-Only) Returns non-zero if the container is currently considered "live", else zero if non-live. The live state for a gizmo is dictated by the live state of its parent pick that attaches it, while a hero is always considered live.

Example: result = this.live

ishero (Read-Only) Returns non-zero if the container is a hero, else zero for a gizmo.

Example: result = this.ishero

isactive (Read-Only) Returns non-zero if the container either is or resides within the currently active actor within the HL interface. If the container is or resides within a different actor, zero is returned.

Example: result = this.isactive

livename (Read-Only) Returns a suitable name for the container that is based on dynamic changes made via scripts. If the container is an actor, the name of the actor is returned, else the name of the parent pick of the gizmo is returned.

Example: result = this.livename

actorname (Read-Only) Returns the name of the actor that encompasses the current container context. The name is whatever has been assigned by the user.

Example: result = this.actorname

playername (Read-Only) Returns the name of the player that is associated with the current lead. The name is whatever has been entered by the user.

Example: result = this.playername

assign[tag] (Read-Only) Assigns the indicated tag to the container. The tag must be specified using the standard "group.id" syntax. The tag is verified to exist during compilation of the script. Always returns a value of zero.

Example: perform this.assign[skill.appraise]

delete[tmpl] (Read-Only) Deletes all tags from the container that match the tag template tmpl. The template must use the standard "group.id" syntax and may contain a wildcard. If the template employs a wildcard, all tags matching the template are deleted. If the template specifies an explicit tag, and the tag has been assigned to the container multiple times, the tag is deleted only once, thereby providing detailed control to authors when needed. Always returns a value of zero.

Example: perform this.delete[skill.craft?]

assignstr[str] (Read-Only) This target reference is identical to "assign", except that the str parameter is a string expression that is evaluated within the script. This allows the tag to be dynamically determined via the script instead of being hard-wired at compilation. Always returns a value of zero.

Example: perform this.assignstr[skill.appraise]

deletestr[str] (Read-Only) This target reference is identical to "delete", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation. Always returns a value of zero.

Example: perform this.deletestr["skill.craft?"]

tagis[tmpl] (Read-Only) Returns non-zero if any tags assigned to the container match the tag template tmpl, else zero if no tags match. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: this.tagis[skill.?]

tagcount[tmpl] (Read-Only) Returns the number of tags assigned to the container that match the tag template tmpl. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagcount[skill.?]

tagvalue[tmpl] (Read-Only) Returns the value of a tag assigned to the container that matches the tag template tmpl. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagvalue[spelllevel.wizard?]

tagmin[tmpl] (Read-Only) Returns the minimum value of all tags assigned to the container that match the tag template tmpl. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagmin[spelllevel.wizard?]

tagmax[tmpl] (Read-Only) Returns the maximum value of all tags assigned to the container that match the tag template tmpl. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagmax[spelllevel.wizard?]

tagunique[tmpl] (Read-Only) Returns the number of unique tags assigned to the container that match the tag template tmpl. If a tag is assigned multiple times, it is only counted once. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagunique[skill.?]

tagexpr[expr] (Read-Only) Returns non-zero if the tags assigned to the container match the tag expression expr, else zero is returned. The expr parameter must be a valid tag expression.

Example: result = this.tagexpr[class.wizard & (val:spelllevel.wizard? > 5)]

tagcountstr[str] (Read-Only) This target reference is identical to "tagcount", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagcountstr["skill.?"]

tagvaluestr[str] (Read-Only) This target reference is identical to "tagvalue", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagvaluestr["spelllevel.wizard?"]

tagminstr[str] (Read-Only) This target reference is identical to "tagmin", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagminstr["spelllevel.wizard?"]

tagmaxstr[str] (Read-Only) This target reference is identical to "tagmax", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagmaxstr["spelllevel.wizard?"]

taguniquestr[str] (Read-Only) This target reference is identical to "tagunique", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.taguniquestr["skill.?"]

tagexprstr[str] (Read-Only) This target reference is identical to "tagexpr", except that the str parameter is a string expression that is evaluated within the script. This allows the tag expression to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagexprstr["class.wizard & (val:spelllevel.wizard? > 5)"]

tagmatch[refgrp,match,ref]
tagsearch[str]
intersect[src,targ]
inherit[id]
tagnames[tmpl,delim]
tagabbrevs[tmpl,delim]
tagids[tmpl,delim]
childexists[id]
childlives[id]
childcount[id]
haschild[str]
isidentity[grp]
setidentity[grp]
countidentity[grp]
setactor
foreach
isminion
ismaster
hasminion[id]
miniontext
sourcetree
isdynalink[expr]
istransact
weight (Read-Only) Returns the total weight of all "gear" picks within the container.

Example: result = this.weight

gearlist[delim,expr]
geartree[expr]
panelvalid[id]
errorcount
errorlist
combatant
initchange
ismoveup
ismovedown
combatmove[expr]
combatmovenow
combatact
combatdefer