Container Context
Context: HL Kit … Kit Reference … Context Transitions
See Also: Container Target References
From within a "container" context, you can utilize the following set of valid context transitions:
state Transitions to the state context.
Example: this.state
hero Transitions to the hero context corresponding to the hero that is the parent of the current container. If the current container is a hero, then this transition changes nothing but does resolve successfully.
Example: this.hero
container Transitions to the container context corresponding to whatever container is the immediate parent of the current container. If the current container is a hero, then the transition fails to resolve.
Example: this.container
parent Transitions to the pick context corresponding to the parent pick that attaches the container. If the container is a hero and has no parent pick, the transition fails to resolve.
Example: this.parent
child[id] Transitions to the pick context corresponding to the first pick within the container that derives from the thing with the id specified. If the container has no child pick with the given unique id, a run-time error notification is reported to the user and the transition fails to resolve.
Example: this.child[mypick]
childfound[id] Transitions to the pick context corresponding to the first pick within the container that derives from the thing with the id specified. This transition is identical to "child[id]", except that the existence of the child pick is optional. If the child is found, the transition occurs normally. If the child does not exist, no run-time error is reported, although the transition still fails to resolve.
Example: this.childfound[mypick]
firstchild[expr,sort] Transitions to the pick context corresponding to the first pick within the container that satisfies the tag expression given by expr. Since multiple children may satisfy the tag expression, an optional sort set id may be specified by sort, resulting in all matching children being sorted and the first child being used after the sort is performed. The tag expression may be either a literal string or a string expression. If no matching child exists, the transition fails to resolve.
Example: this.firstchild[expr,mysort]
Example: this.firstchild[expr]anchor Transitions to the pick context corresponding to the pick within the master actor that attaches the current actor as a minion. If the container does not reside within a minion, the transition fails to resolve.
Example: this.anchor
master Transitions to the hero context corresponding to the master actor for which this container is a minion. If the container is not a minion, the transition fails to resolve.
Example: this.master
minion[id] Transitions to the hero context corresponding to the minion actor with the given id that exists beneath the actor that possesses the current container. If the container is not a master or the specified minion does not exist, the transition fails to resolve.
Example: this.minion[myminion]
herofield[id] Transitions to the field context corresponding to the field given by id that exists on the "actor" pick for the containing actor. This is a shorthand notation for "hero.child[actor].field[id]".
Example: this.herofield[myfield]
usagepool[id] Transitions to the pool context corresponding to the usage pool given by id that exists within the current container. This transition is only valid for actors, since gizmos do not possess usage pools.
Example: this.usagepool[mypool]
transact Transitions to the pick context corresponding to the transaction pick that is associated with the hero governing the current context.
Example: this.transact
NOTE! The transaction pick is only utilized within buy and sell transactions. As such, this transition is only valid within a few select scripts.dynalink[index] Transitions to the pick context corresponding to the registered dynamic linkage with the index specified. If no dynamic linkage has been registered with the given index, the transition fails to resolve. The index may be an arithmetic expression that calculates the actual index value to be used.
Example: this.dynalink[myindex]