Difference between revisions of "NewTurn Script"

From HLKitWiki
Jump to: navigation, search
(New page: {{context|Kit Reference|Script Types}} ==Technical Details== :{| class="scripttable" |class="leftnormal"|Initial Context: |Pick |- |Alternate Context: |None |- |Fields F...)
 
(Technical Details)
 
(3 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
|Fields Finalized?
 
|Fields Finalized?
 
|No
 
|No
 +
|-
 +
|Where Used:
 +
|[[Behavior Element (Data)|Definition File]]
 +
|-
 +
|Procedure Use:
 +
|"newturn" type, "pick" context
 
|-
 
|-
 
|}
 
|}
Line 18: Line 24:
  
 
:{| class="infotable"
 
:{| class="infotable"
|class="leftnormal"|-None-
+
|class="leftnormal"|isfirst
|There are no special symbols for a NewTurn script.  
+
|(Number) Entry: Non-zero if this script is being invoked for the first actor in the portfolio.<br>
 +
Exit: Ignored.
 
|-
 
|-
 
|}
 
|}
Line 25: Line 32:
 
==Description==
 
==Description==
  
The NewTurn script is invoked whenever the user triggers the start of a new combat turn within the Tactical Console. Prior to the start of the new turn, this script is applied to each actor. When invoked, the NewTurn script starts with the "actor" pick of each actor in the combat as its initial context (non-combatants are ignored). This allows the author to reset state for each actor prior to each new combat turn.
+
The NewTurn script is invoked whenever the user triggers the start of a new combat turn within the Tactical Console. Prior to the start of the new turn, this script is applied to each actor. When invoked, the NewTurn script starts with the "actor" pick of an actor in the combat as its initial context. It is invoked for all actors in the combat (non-combatants are ignored), being performed after any NewCombat script and before any Initiative script. This allows the author to reset state for each actor prior to each new combat turn.
  
 
==Example==
 
==Example==

Latest revision as of 01:59, 20 February 2009

Context: HL KitKit Reference … Script Types 

Technical Details

Initial Context: Pick
Alternate Context: None
Fields Finalized? No
Where Used: Definition File
Procedure Use: "newturn" type, "pick" context

The NewTurn script utilizes the following special symbols:

isfirst (Number) Entry: Non-zero if this script is being invoked for the first actor in the portfolio.

Exit: Ignored.

Description

The NewTurn script is invoked whenever the user triggers the start of a new combat turn within the Tactical Console. Prior to the start of the new turn, this script is applied to each actor. When invoked, the NewTurn script starts with the "actor" pick of an actor in the combat as its initial context. It is invoked for all actors in the combat (non-combatants are ignored), being performed after any NewCombat script and before any Initiative script. This allows the author to reset state for each actor prior to each new combat turn.

Example

If a game system has state for each actor that needs to be reset at the start of each new combat turn, that can be accomplished via the NewTurn script.

herofield[acState].value = 0