Integrate Script: Difference between revisions

From HLKitWiki
Jump to navigationJump to search
New page: {{context|Kit Reference|Script Types}} ==Technical Details== :{| class="scripttable" |class="leftnormal"|Initial Context: |Pick |- |Alternate Context: |None |- |Fields F...
 
 
(2 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:
|"integrate" type, "pick" context
|-
|-
|}
|}
Line 27: Line 33:
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.
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.
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 an actor as its initial context.


==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: "integrate" type, "pick" context

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 an 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