Build Trigger: Difference between revisions

From Ashes of the Singularity - Official Wiki
Jump to navigation Jump to search
(Created page with "A '''Build trigger''' fires when a human player builds structures or units. ==Arguments== *'''Target''' - The template of the building that will fire this trigger *'''IsBuil...")
 
No edit summary
Line 1: Line 1:
[[Category:Triggers]]
A '''Build trigger''' fires when a human player builds structures or units.
A '''Build trigger''' fires when a human player builds structures or units.


==Arguments==
== Arguments ==
 
*'''Target''' - The template of the building that will fire this trigger  
*'''Target''' - The template of the building that will fire this trigger  
*'''IsBuilding''' - Set to "1" if the target is a building  
*'''IsBuilding''' - Set to "1" if the target is a building  
*'''Count''' - How many of the target template must be built to fire the trigger (default 1)  
*'''Count''' - How many of the target template must be built to fire the trigger (default 1)  


==Common Usage==
== Common Usage ==
*Completing objectives when a player builds something you told them to.
 
*Completing objectives when a player builds something you told them to.  
 
== Examples ==


==Examples==
     <Trigger Name="Units" Type="Build" Target="PHC_T1_Light" Center="0,2600,0" Size="400" Inactive="1">
     <Trigger Name="Units" Type="Build" Target="PHC_T1_Light" Center="0,2600,0" Size="400" Inactive="1">
         <LetterBox Enable="1" />
         <LetterBox Enable="1" />
Line 24: Line 28:
       <ActivateTrigger Target="MoveToRelay1" />
       <ActivateTrigger Target="MoveToRelay1" />
     </Trigger>
     </Trigger>
From an early tutorial mission, this completes some objectives, plays some dialog, and gives new objectives (and activates the trigger that will complete them) when the player builds the Brutes they've been instructed to.
From an early tutorial mission, this completes some objectives, plays some dialog, and gives new objectives (and activates the trigger that will complete them) when the player builds the Brutes they've been instructed to.

Revision as of 20:21, 18 January 2017

A Build trigger fires when a human player builds structures or units.

Arguments

  • Target - The template of the building that will fire this trigger
  • IsBuilding - Set to "1" if the target is a building
  • Count - How many of the target template must be built to fire the trigger (default 1)

Common Usage

  • Completing objectives when a player builds something you told them to.

Examples

   <Trigger Name="Units" Type="Build" Target="PHC_T1_Light" Center="0,2600,0" Size="400" Inactive="1">
       <LetterBox Enable="1" />
       <GrantStuff Player="0" Metal="500" />
       <Restrict Type="Unit" ID="PHC_T1_Recon" Enable="1" />
       <Restrict Type="Unit" ID="PHC_T1_MRM"   Enable="1" />
       <Dialog>
           <Entry Icon="Mac" Text="Mission2_T5_1" Audio="audio/campaign/Mission2_Cygnus/Mission2_T5_1.wav"/>
       </Dialog>
       <Objective Name="BuildBrutes" SetCheck="1"/>
       <Objective Name="BuildFactory" Hide="0"/>
       <Objective Name="BuildEngineer" Hide="0"/>
       <Objective Name="BuildMetalExtractors" Hide="0"/>
     <ActivateTrigger Target="MoveToRelay1" />
   </Trigger>

From an early tutorial mission, this completes some objectives, plays some dialog, and gives new objectives (and activates the trigger that will complete them) when the player builds the Brutes they've been instructed to.