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.