# Triggering Ability Stage

Grammar — Triggering ability stage
FlagsNative | Function

Returns the triggering ability stage. Used in response to “Unit Uses Ability”.

Returns — int<preset::AbilityStage>

native int EventUnitAbilityStage();

# Supported triggers

Category: Ability / Basic

# Examples

campaigns/void.sc2campaignbase.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.sc2mapMapScript.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.stormmodbase.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.sc2modbase.sc2data/LibCOMI.galaxy:27124

    }

    auto18D116F0_val = EventUnitAbilityStage();
    if (auto18D116F0_val == c_abilEffectStageCast) {
        lv_event = "ZeratulEvent_ProphecyCastStart";