State Target References

From HLKitWiki
Jump to: navigation, search

Context: HL KitKit Reference … Target References 

See Also: State Context Transitions

The "state" context is a general context that maintains information outside the normal data hierarchy. The target references for this context span a wide range of details that may prove useful within your scripts. The complete list of target references for the "state" context is presented in the table below.

isfocus (Right, Number) Returns non-zero if a focus pick has been properly established via the "setfocus" target reference.

Example: result = state.isfocus

clearfocus (Right, Number) Clears any focus pick that has been established and resets to a state where there is no focus pick.

Example: perform state.clearfocus

timing (Right, String) Returns the phase and priority timing during which the current script is being invoked in an effort to simplify debugging of data files.

Example: result = state.timing

iscreate (Right, Number) Returns non-zero if the character is currently in creation mode.

Example: result = state.iscreate

isadvance (Right, Number) Returns non-zero if the character is currently in advancement mode.

Example: result = state.isadvance

issell (Right, Number) Returns non-zero if the user is currently in the midst of a sell transaction.

Example: result = state.issell

isload (Right, Number) Returns non-zero if the loading of a saved portfolio is currently in progress.

Example: result = state.isload

isoutput (Right, Number) Returns non-zero if the rendering of character sheet output is currently in progress.

Example: result = state.isoutput

isdossierstyle[style] (Right, Number) Returns whether the user selected text output to be formatted in the style given by the style parameter. The style parameter must be one of the following values: "plain", "html", or "bbcode".

Example: result = state.isdossierstyle[html]

istext (Right, Number) Returns non-zero if the render of text output is currently in progress.

Example: result = state.istext

iscombat (Right, Number) Returns non-zero if combat mode is currently enabled within the Tactical Console.

Example: result = state.iscombat

isendturn (Right, Number) Returns non-zero if all combatants have taken their allotted actions and it is valid to end the current combat turn.

Example: result = state.isendturn

combatturn (Right, Number) Returns the current combat turn that is underway within the Tactical Console.

Example: result = state.combatturn

initchange (Right, Number) Returns non-zero if any actor has a user-modified initiative value.

Example: result = state.initchange

actorcount (Right, Number) Returns the total number of actors within the portfolio, including all minions.

Example: result = state.actorcount

reload[table] (Right, Number) Forces a re-load and re-sort of the table portal whose id is given by the table parameter. This target reference is only accessible from within a Trigger Script.

Example: result = state.reload[myportal]