EndCombat Script
Context: HL Kit … Kit Reference … Script Types
Technical Details
Initial Context: Pick Alternate Context: None Fields Finalized? No Where Used: Definition File Procedure Use: "endcombat" type, "pick" context
The EndCombat 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 EndCombat script is the counterpart of the NewCombat script and is invoked whenever the user triggers the end of a combat within the Tactical Console. When combat is ended, this script is applied to each actor. Like its counterpart, the EndCombat 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 after combat completes.
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 can be reset at the end of combat instead of at the start.
herofield[acAbandon].value = 0