Difference between revisions of "State Context"

From HLKitWiki
Jump to: navigation, search
(New page: {{context|Kit Reference|Context Transitions}} See Also: State Target References From within a "state" context, you can utilize the following set of valid context transitions: :{| cl...)
 
Line 1: Line 1:
{{context|Kit Reference|Context Transitions}}
+
{{contextmulti|Kit Reference}}
  
See Also: [[State Target References]]
+
Jump to: [[#references|Target References]]
 +
 
 +
The "state" context provides access to overall state information that pertains to the portfolio as a whole or general information about the evaluation cycle.
 +
 
 +
==Context Transitions{{anchor|transitions}}==
  
 
From within a "state" context, you can utilize the following set of valid context transitions:
 
From within a "state" context, you can utilize the following set of valid context transitions:
Line 8: Line 12:
 
|class="leftnormal"|-None-
 
|class="leftnormal"|-None-
 
|There are no transitions from within a state context.
 
|There are no transitions from within a state context.
 +
|-
 +
|}
 +
 +
==Target References{{anchor|references}}==
 +
 +
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.
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|isfocus
 +
|(Right, Number) Returns non-zero if a focus pick has been properly established via the "setfocus" target reference.<br>
 +
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.<br>
 +
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.<br>
 +
Example: result = state.timing
 +
|-
 +
|iscreate
 +
|(Right, Number) Returns non-zero if the character is currently in creation mode.<br>
 +
Example: result = state.iscreate
 +
|-
 +
|isadvance
 +
|(Right, Number) Returns non-zero if the character is currently in advancement mode.<br>
 +
Example: result = state.isadvance
 +
|-
 +
|issell
 +
|(Right, Number) Returns non-zero if the user is currently in the midst of a sell transaction.<br>
 +
Example: result = state.issell
 +
|-
 +
|isload
 +
|(Right, Number) Returns non-zero if the loading of a saved portfolio is currently in progress.<br>
 +
Example: result = state.isload
 +
|-
 +
|isoutput
 +
|(Right, Number) Returns non-zero if the rendering of character sheet output is currently in progress.<br>
 +
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".<br>
 +
Example: result = state.isdossierstyle[html]
 +
|-
 +
|istext
 +
|(Right, Number) Returns non-zero if the render of text output is currently in progress.<br>
 +
Example: result = state.istext
 +
|-
 +
|iscombat
 +
|(Right, Number) Returns non-zero if combat mode is currently enabled within the Tactical Console.<br>
 +
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.<br>
 +
Example: result = state.isendturn
 +
|-
 +
|combatturn
 +
|(Right, Number) Returns the current combat turn that is underway within the Tactical Console.<br>
 +
Example: result = state.combatturn
 +
|-
 +
|initchange
 +
|(Right, Number) Returns non-zero if any actor has a user-modified initiative value.<br>
 +
Example: result = state.initchange
 +
|-
 +
|actorcount
 +
|(Right, Number) Returns the total number of actors within the portfolio, including all minions.<br>
 +
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]].<br>
 +
Example: result = state.reload[myportal]
 
|-
 
|-
 
|}
 
|}

Revision as of 16:50, 7 December 2008

Context: HL KitKit Reference  … Multiple Sources

Jump to: Target References

The "state" context provides access to overall state information that pertains to the portfolio as a whole or general information about the evaluation cycle.

Context Transitions

From within a "state" context, you can utilize the following set of valid context transitions:

-None- There are no transitions from within a state context.

Target References

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]