Build Trigger

From Ashes of the Singularity
Jump to: navigation, search

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.