Integrate Script

From HLKitWiki
Revision as of 03:57, 14 December 2008 by Rob (Talk | contribs) (New page: {{context|Kit Reference|Script Types}} ==Technical Details== :{| class="scripttable" |class="leftnormal"|Initial Context: |Pick |- |Alternate Context: |None |- |Fields F...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Context: HL KitKit Reference … Script Types 

Technical Details

Initial Context: Pick
Alternate Context: None
Fields Finalized? No

The Integrate script utilizes the following special symbols:

-None- There are no special symbols for a Integrate script.

Description

The Integrate script serves a very specific purpose. When the user triggers the integration of pending actors into an existing combat within the Tactical Console, this script allows the author to piggyback additional special handling. In general, you should not need to perform any special behaviors, but the mechanism is provided just in case.

When integration is triggered by the user, the Integrate script is applied to each actor after it has been properly integrated into the combat. When invoked, the Integrate script starts with the "actor" pick of each actor as its initial context.

Example

In a game system like D&D 4th Edition, there are "encounter" powers, which can be used once per encounter. It might make sense for a game like this to automatically reset the state of each encounter power within the Integrate script. If so, then the corresponding script might look like below.

foreach pick in hero where "Power.Encounter"
  eachpick.field[pwrIsUsed].value = 0
  nexteach