Area Trigger

From Ashes of the Singularity
Jump to: navigation, search

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" />
   <Var Name="vRegionsHarvested" Operation="+" Value="1" />
 </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.