Skip to content

Triggers

Edits the AbilityTriggers array of the template. The trigger of class Class is edited in place if present; otherwise behaviour depends on Mode. Caveat: adding a new X2AbilityTrigger_EventListener from config is rarely useful - its ListenerData.EventFn delegate can only be assigned in code and stays none. Editing an existing listener trigger preserves its EventFn. X2AbilityTrigger_OnAbilityActivated is handled by the EventListener editor (its MatchAbilityActivated field is protected and cannot be set). See also AbilityEventListenerEdits in the template fields for the separate Template.AbilityEventListeners array.

Config key: Triggers. Edit struct: TriggerEdit.

Dispatch order

The first editor that accepts a class handles it, so a class is matched by the earliest entry below that it derives from.

DLC_2.X2AbilityTrigger_DLC_Day60OnAbilityActivatedbridge → X2AbilityTrigger_UnitPostBeginPlay → X2AbilityTrigger_EventListener → X2AbilityTrigger_Event → any other class

bridge Provided by a bridge mod and only present when that mod is installed; bridge editors are checked before every built-in one.

Shared fields

Available on every TriggerEdit entry, whatever its Class.

No editable fields.

Classes

Class-specific fields are documented on each page below. A class with no dedicated editor still accepts every field in Shared fields.

Game class Own fields Editor extends Provided by
DLC_2.X2AbilityTrigger_DLC_Day60OnAbilityActivated 2 X2AbilityTriggerEditor_EventListener Ability Editor: Alien Hunters
X2AbilityTrigger_Event 2 X2AbilityTriggerEditor_Base built-in
X2AbilityTrigger_EventListener 4 X2AbilityTriggerEditor_Base built-in
X2AbilityTrigger_UnitPostBeginPlay 1 X2AbilityTriggerEditor_Base built-in