NewCombat Script: Difference between revisions
No edit summary |
|||
(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: | |||
|"newcombat" type, "pick" context | |||
|- | |- | ||
|} | |} | ||
Line 18: | Line 24: | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"| | |class="leftnormal"|isfirst | ||
| | |(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 NewCombat script is invoked whenever the user triggers the start of a new combat within the Tactical Console. Prior to the actual transition into combat mode, this script is applied to each actor. When invoked, the NewCombat 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). This allows the author to reset state for each actor prior to the new combat. | The NewCombat script is invoked whenever the user triggers the start of a new combat within the Tactical Console. Prior to the actual transition into combat mode, this script is applied to each actor. When invoked, the NewCombat 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), and that is done before the NewTurn or Initiative scripts are invoked. This allows the author to reset state for each actor prior to the new combat. | ||
==Example== | ==Example== |
Latest revision as of 08:59, 20 February 2009
Context: HL Kit … Kit Reference … Script Types
Technical Details
Initial Context: Pick Alternate Context: None Fields Finalized? No Where Used: Definition File Procedure Use: "newcombat" type, "pick" context
The NewCombat 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 NewCombat script is invoked whenever the user triggers the start of a new combat within the Tactical Console. Prior to the actual transition into combat mode, this script is applied to each actor. When invoked, the NewCombat 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), and that is done before the NewTurn or Initiative scripts are invoked. This allows the author to reset state for each actor prior to the new combat.
Example
In various game systems, there is the notion of "waiting" or "holding an action". This state will persist for each actor after combat ends, so it needs to be reset at the start of combat.
herofield[acAbandon].value = 0