# Triggering Ability Stage
Grammar — Triggering ability stage
Flags —Native
|Function
Returns the triggering ability stage. Used in response to “Unit Uses Ability”.
Returns — int
<preset::AbilityStage>
native int EventUnitAbilityStage();
# Supported triggers
- Unit Uses Ability — TriggerAddEventUnitAbility
# Related
Category: Ability / Basic
- Remove Ability —
void
— UnitAbilityRemove - Add Ability —
void
— UnitAbilityAdd - Unit Uses Ability —
void
— TriggerAddEventUnitAbility - Unit Changes Ability Auto Cast State —
void
— TriggerAddEventUnitAbilityAutoCastChange - Triggering Ability —
abilcmd
— EventUnitAbility - Triggering Ability Stage —
int
<preset::AbilityStage> — EventUnitAbilityStage - Triggering Ability Target Point —
point
— EventUnitTargetPoint - Triggering Ability Target Unit —
unit
— EventUnitTargetUnit - Triggering Ability Other Unit —
unit
— EventUnitAbilityOtherUnit - Ability From Item or Trigger —
abilcmd
— libNtve_gf_EventItemAbilityOrUnitAbility - Unit Is Created —
void
— TriggerAddEventUnitCreated - Created Unit —
unit
— EventUnitCreatedUnit - Behavior That Created Unit —
string
<gamelink::Behavior> — EventUnitCreatedBehavior - Ability That Created Unit —
string
<gamelink::Abil> — EventUnitCreatedAbil - Show/Hide Ability For Unit —
void
— UnitAbilityShow - Ability Enabled For Unit —
bool
— UnitAbilityCheck - Number Of Abilities On Unit —
int
— UnitAbilityCount - Unit Ability —
string
<gamelink::Abil> — UnitAbilityGet - Unit Ability By Class —
string
<gamelink::Abil> — libNtve_gf_UnitAbilityGetByType - Unit Ability Command State —
bool
— UnitCheckAbilCmdState - Unit Ability Order State (Flags) —
int
— UnitAbilOrderStateFlags - Unit Has Ability —
bool
— UnitAbilityExists - Enable/Disable Ability For Unit —
void
— UnitAbilityEnable - Add Level To Unit Ability —
void
— UnitAbilityChangeLevel - Replace Unit Ability —
void
— UnitAbilityChangeLink - Set Ability Default Submenu —
void
— UnitAbilityChangeCardId - Current Level For Unit Ability —
int
— UnitAbilityGetLevel - Maximum Level For Unit Ability —
int
— UnitAbilityMaxLevel - Ability Matches Filters —
bool
— libNtve_gf_AbilityMatchesFilters - Unit Ability By Filters —
string
<gamelink::Abil> — libNtve_gf_UnitAbilityByFilters - Unit Ability Default Submenu —
string
— UnitAbilityGetCardId
# Examples
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:17204
else {
}
if ((UnitGetType(EventUnit()) == "Probe") && (EventUnitAbility() == AbilityCommand("ProtossBuild", 1)) && (EventUnitAbilityStage() == c_abilBuildStageApproach)) {
if ((lv_gatewayValid1 == false) && (lv_gatewayValid2 == false)) {
TransmissionClearAll();
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:17204
else {
}
if ((UnitGetType(EventUnit()) == "Probe") && (EventUnitAbility() == AbilityCommand("ProtossBuild", 1)) && (EventUnitAbilityStage() == c_abilBuildStageApproach)) {
if ((lv_gatewayValid1 == false) && (lv_gatewayValid2 == false)) {
TransmissionClearAll();
mods/heromods/dva.stormmod — base.stormdata/LibHDVA.galaxy:1396
lv_dVaPlayer = UnitGetOwner(EventUnit());
lv_targetUnit = EventUnitTargetUnit();
lv_stage = EventUnitAbilityStage();
if ((lv_targetUnit != null) && (UnitFilterMatch(lv_targetUnit, lv_dVaPlayer, UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterMissile) | (1 << c_targetFilterItem) | (1 << c_targetFilterCloaked), (1 << (c_targetFilterStasis - 32)) | (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterInvulnerable - 32)))) == true)) {
if ((lv_stage == c_unitAbilStageExecute)) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:27124
}
auto18D116F0_val = EventUnitAbilityStage();
if (auto18D116F0_val == c_abilEffectStageCast) {
lv_event = "ZeratulEvent_ProphecyCastStart";