Destruction 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=Destruction Trigger
}}
 
'''Destruction triggers''' fire when something specific dies.
'''Destruction triggers''' fire when something specific dies.


== Arguments ==
{{SectionTemplate
 
|h=h3
|title=Arguments
|content=}}
*'''IsBuilding''' - If this is a building (if not it refers to a unit).  
*'''IsBuilding''' - If this is a building (if not it refers to a unit).  
*'''Target''' - Name of the script-spawned unit or building.  
*'''Target''' - Name of the script-spawned unit or building.  


== Common Usage ==


{{SectionTemplate
|h=h3
|title=Common Usage
|content=}}
*Failing a scenario if the player loses a VIP unit  
*Failing a scenario if the player loses a VIP unit  
*Completing objectives when the player destroys a target  
*Completing objectives when the player destroys a target  


== Limitations ==


{{SectionTemplate
|h=h3
|title=Limitations
|content=}}
*Cannot be used with units/buildings built 'organically' - only stuff spawned and named within the script  
*Cannot be used with units/buildings built 'organically' - only stuff spawned and named within the script  
*For explicit victory conditions built on blowing up enemy Nexuses, use [[ZoneCapture|ZoneCapture]] instead  
*For explicit victory conditions built on blowing up enemy Nexuses, use [[ZoneCapture|ZoneCapture]] instead  


== Examples ==


{{SectionTemplate
|h=h3
|title=Examples
|content=}}
   <Trigger Name="tLossSpeech" Type="Destruction" Target="uPlayerHero2" >  
   <Trigger Name="tLossSpeech" Type="Destruction" Target="uPlayerHero2" >  
     <Dialog>
     <Dialog>
Line 36: Line 52:
     <Objective Name="oSurviveSouth" String="Europa_oSurviveSouth" SetCheck="true" />
     <Objective Name="oSurviveSouth" String="Europa_oSurviveSouth" SetCheck="true" />
     <Objective Name="oIncoming"    Hide="true" />
     <Objective Name="oIncoming"    Hide="true" />
     <ActivateTrigger Target="tFadeMaulerObjective" />
     <ActivateTrigger Target="tFadeMaulerObjective" />
     <ActivateTrigger Target="tPlayerFreeDreads" />
     <ActivateTrigger Target="tPlayerFreeDreads" />
Line 42: Line 57:


From Europa in Memories, this moves the scenario along when the player destroys an incoming force they were warned about.
From Europa in Memories, this moves the scenario along when the player destroys an incoming force they were warned about.
[[Category:Triggers]]

Latest revision as of 16:00, 24 November 2020


Destruction Trigger


Destruction triggers fire when something specific dies.

Arguments

  • IsBuilding - If this is a building (if not it refers to a unit).
  • Target - Name of the script-spawned unit or building.


Common Usage

  • Failing a scenario if the player loses a VIP unit
  • Completing objectives when the player destroys a target


Limitations

  • Cannot be used with units/buildings built 'organically' - only stuff spawned and named within the script
  • For explicit victory conditions built on blowing up enemy Nexuses, use ZoneCapture instead


Examples

 <Trigger Name="tLossSpeech" Type="Destruction" Target="uPlayerHero2" > 
   <Dialog>
     <Entry Icon="Haalee" Text="Ganymede_Loss_1"  Audio = "Audio/Campaign/Memories2_Ganymede/Memory_2_Haalee_12.wav" />
   </Dialog>
   <Objective Name="oProtectAvatar" String="Ganymede_oProtectAvatarFailed" SetCheck="false" />
   <ActivateTrigger Target="tActualLoss" />
 </Trigger>

From Ganymede in Memories, this plays audio when the player loses their special Avatar unit, marks the objective failed, and activates a short timer for the actual mission loss (so you have a chance to hear the dialog and reflect on your failure).

 <Trigger Name="tSouthSurvived" Type="Destruction" Target="uSouthReinforcement_Leader" >
   <Reveal Name="rSouthIncoming_Reveal" Position="200,5900" Size="700" Enable="0" />
   <Dialog>
     <Entry Icon="Haalee" Text="Europa_SouthSurvived_1" Audio = "Audio/Campaign/Memories3_Europa/Memory_3_Haalee_15.wav" />
   </Dialog>
   <Objective Name="oSurviveSouth" String="Europa_oSurviveSouth" SetCheck="true" />
   <Objective Name="oIncoming"     Hide="true" />
   <ActivateTrigger Target="tFadeMaulerObjective" />
   <ActivateTrigger Target="tPlayerFreeDreads" />
 </Trigger>

From Europa in Memories, this moves the scenario along when the player destroys an incoming force they were warned about.