Area Trigger: Difference between revisions

From Ashes of the Singularity - Official Wiki
Jump to navigation Jump to search
(Created page with "An Area trigger fires when the human player moves a unit into the area. ==Arguments== *'''Center''' - Map coordinates of the center of the area. Required. *'''Size''' - Size...")
 
mNo edit summary
Line 1: Line 1:
An Area trigger fires when the human player moves a unit into the area.
An Area trigger fires when the human player moves a unit into the area.


==Arguments==
== Arguments ==
 
*'''Center''' - Map coordinates of the center of the area. Required.  
*'''Center''' - Map coordinates of the center of the area. Required.  
*'''Size''' - Size of the area.  
*'''Size''' - Size of the area.  
*'''Template''' - Template name of the unit that can trigger this. If you want it to fire if any unit enters the area, do not specify a Template argument.  
*'''Template''' - Template name of the unit that can trigger this. If you want it to fire if any unit enters the area, do not specify a Template argument.  


==Common Usage==
== Common Usage ==
 
Area triggers are useful for:
Area triggers are useful for:
#Warning a player about a heavily defended location
#Warning a player about an enemy base that might not be a good idea to assault until he's completed some other mission objectives
#"Waking up" an AI player that the player got too close to
#Setting up 'escort' type missions that have some effect when the player gets a unit somewhere


==Examples==
#Warning a player about a heavily defended location
#Warning a player about an enemy base that might not be a good idea to assault until he's completed some other mission objectives
#"Waking up" an AI player that the player got too close to
#Setting up 'escort' type missions that have some effect when the player gets a unit somewhere
 
== Examples ==
 
   <Trigger Name="tHarvest_00" Type="Area" Center="0,-1408" Size="300" Template="SS_A_Harvester" >
   <Trigger Name="tHarvest_00" Type="Area" Center="0,-1408" Size="300" Template="SS_A_Harvester" >
     <AreaIndicator Name="iHarvest_00" Position="64,-1344" Size="225" Color="Blue" Duration="0" />
     <AreaIndicator Name="iHarvest_00" Position="64,-1344" Size="225" Color="Blue" Duration="0" />
     <Var Name="vRegionsHarvested" Operation="+" Value="1" />
     <Var Name="vRegionsHarvested" Operation="+" Value="1" />
   </Trigger>
   </Trigger>
This is from the Betelgeuse mission in Escalation, and both fades an AreaIndicator and increments the variable for "regions harvested" when the player brings a Harvester to the targeted area.
This is from the Betelgeuse mission in Escalation, and both fades an AreaIndicator and increments the variable for "regions harvested" when the player brings a Harvester to the targeted area.


Line 24: Line 30:
         <Objective Name="LandEngineer" SetCheck="1"/>
         <Objective Name="LandEngineer" SetCheck="1"/>
         <Objective Name="Setupbase" String="Mission5_Objective4B"/>
         <Objective Name="Setupbase" String="Mission5_Objective4B"/>
         <Restrict Type="Orbital" ID="CallEngineer" Enable="1"/>
         <Restrict Type="Orbital" ID="CallEngineer" Enable="1"/>
         <Dialog>
         <Dialog>
Line 33: Line 38:
         <ActivateTrigger Target="NoSneaky" />
         <ActivateTrigger Target="NoSneaky" />
     </Trigger>
     </Trigger>
From Decanus in Imminent Crisis, this kicks off a whole new phase of the mission when the player successfully drops an Engineer to the western staging point.
From Decanus in Imminent Crisis, this kicks off a whole new phase of the mission when the player successfully drops an Engineer to the western staging point.

Revision as of 23:13, 17 January 2017

An Area trigger fires when the human player moves a unit into the area.

Arguments

  • Center - Map coordinates of the center of the area. Required.
  • Size - Size of the area.
  • Template - Template name of the unit that can trigger this. If you want it to fire if any unit enters the area, do not specify a Template argument.

Common Usage

Area triggers are useful for:

  1. Warning a player about a heavily defended location
  2. Warning a player about an enemy base that might not be a good idea to assault until he's completed some other mission objectives
  3. "Waking up" an AI player that the player got too close to
  4. Setting up 'escort' type missions that have some effect when the player gets a unit somewhere

Examples

 <Trigger Name="tHarvest_00" Type="Area" Center="0,-1408" Size="300" Template="SS_A_Harvester" >
   <AreaIndicator Name="iHarvest_00" Position="64,-1344" Size="225" Color="Blue" Duration="0" />
   
 </Trigger>

This is from the Betelgeuse mission in Escalation, and both fades an AreaIndicator and increments the variable for "regions harvested" when the player brings a Harvester to the targeted area.

   <Trigger Name="DropEngineer" Type="Area"  Template="PHC_2_Engineer" Center="5200,0,0" Size="500">
       <AreaIndicator Name="EngineerDropSite" Duration="0"/>
       <Objective Name="LandEngineer" SetCheck="1"/>
       <Objective Name="Setupbase" String="Mission5_Objective4B"/>
       <Restrict Type="Orbital" ID="CallEngineer" Enable="1"/>
       <Dialog>
           <Entry Icon="Mac" Text="Mission5_T4a_3" Audio="audio/campaign/Mission5_Decanus/Mission5_T4a_3.wav"/>
       </Dialog>
       <ActivateTrigger Target="EnableEnemyAIDelay" />
       <ActivateTrigger Target="ScoutAdvice" />
       <ActivateTrigger Target="NoSneaky" />
   </Trigger>

From Decanus in Imminent Crisis, this kicks off a whole new phase of the mission when the player successfully drops an Engineer to the western staging point.