Build Trigger: Difference between revisions

From Ashes of the Singularity - Official Wiki
Jump to navigation Jump to search
No edit summary
m (Updated look.)
 
Line 1: Line 1:
[[Category:Triggers]]
{{DISPLAYTITLE:<span style="position: absolute; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);">{{FULLPAGENAME}}</span>}}
 
{{HeaderTemplate
|welcome=Build Trigger
}}
 
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 ==
{{SectionTemplate
 
|h=h3
|title=Arguments
|content=}}
*'''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 ==


{{SectionTemplate
|h=h3
|title=Common Usage
|content=}}
*Completing objectives when a player builds something you told them to.  
*Completing objectives when a player builds something you told them to.  


== Examples ==


{{SectionTemplate
|h=h3
|title=Examples
|content=}}
     <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 30: Line 43:


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.
[[Category:Triggers]]

Latest revision as of 15:49, 24 November 2020


Build Trigger


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.