# Trigger Active Count

Grammar — Number of active instances of t
FlagsNative | Function

Returns the number of instances of the specified trigger which are currently executing.

# Arguments

  • trigger — Trigger

Returns — int

native int TriggerActiveCount(trigger t);

Category: Trigger / Basic

# Examples

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:3810

    else {
    }
    if ((TriggerActiveCount(lib281DEC45_gt_ZSS_CustomConvoSkipping) > 0)) {
        TriggerStop(lib281DEC45_gt_ZSS_CustomConvoSkipping);
        if (((lp_fadeStyle & lib281DEC45_ge_SwarmStoryFadeStyle_FadeOutAfter) != 0)) {

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:4146

    if ((OrderGetAbilityCommand(UnitOrder(gv_basic01Marine, 0)) == AbilityCommand("move", 0)) && (OrderGetTargetType(UnitOrder(gv_basic01Marine, 0)) == c_orderTargetPoint) && (DistanceBetweenPoints(PointFromId(6), OrderGetTargetPoint(UnitOrder(gv_basic01Marine, 0))) < 2.0)) {
        gf_DestroyTutorialTextTag();
        if ((TriggerActiveCount(gt_BasicMoveUnitIntroQ) == 0)) {
            gf_StopReminderTimer();
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:4154

    else {
        gf_CreateRClickToMoveTag(gv_basicMoveUnitBeacon, 80);
        if ((TriggerActiveCount(gt_BasicMoveUnitIntroQ) == 0)) {
            gf_StartReminderTimer();
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:4414

        gf_TutorialUnpause();
        TransmissionClearAll();
        if ((TriggerActiveCount(gt_BasicAttackIntroQ) == 0)) {
            gf_StopReminderTimer();
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:4434

        else {
        }
        if ((TriggerActiveCount(gt_BasicAttackIntroQ) == 0)) {
            gf_StartReminderTimer();
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:4958

    TriggerEnable(TriggerGetCurrent(), false);
    CameraPan(gv_p01_USER, PointFromId(8), 2.0, -1, 10.0, false);
    if ((TriggerActiveCount(gt_BasicMinimapIntroQ) == 0)) {
        gf_SilenceQ();
        TriggerExecute(gt_BasicMinimapCameraResetQ, true, false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:5359

        gf_TutorialUnpause();
        TransmissionClearAll();
        if ((TriggerActiveCount(gt_BasicAttackGroupIntroQ) == 0)) {
            gf_StopReminderTimer();
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:5385

        else {
        }
        if ((TriggerActiveCount(gt_BasicAttackGroupIntroQ) == 0)) {
            gf_StartReminderTimer();
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:9285

        UnitGroupLoopEnd();
        if ((lv_validOrder == true)) {
            if ((TriggerActiveCount(gt_TerranFindScoutsQ) == 0)) {
                gf_StopReminderTimer();
            }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:9300

        }
        else {
            if ((TriggerActiveCount(gt_TerranFindScoutsQ) == 0)) {
                gf_StartReminderTimer();
            }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur02.sc2map/MapScript.galaxy:3135

    }
    else {
        if ((TriggerActiveCount(gt_TMakeAssimilatorIntro1Q) == 0) && (TriggerActiveCount(gt_TMakeAssimilatorIntro2Q) == 0)) {
            UISetButtonFaceHighlighted(PlayerGroupAll(), "Assimilator", true);
            TriggerEnable(gt_TMakeAssimilatorTargeting, true);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur02.sc2map/MapScript.galaxy:3135

    }
    else {
        if ((TriggerActiveCount(gt_TMakeAssimilatorIntro1Q) == 0) && (TriggerActiveCount(gt_TMakeAssimilatorIntro2Q) == 0)) {
            UISetButtonFaceHighlighted(PlayerGroupAll(), "Assimilator", true);
            TriggerEnable(gt_TMakeAssimilatorTargeting, true);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:4146

    if ((OrderGetAbilityCommand(UnitOrder(gv_basic01Marine, 0)) == AbilityCommand("move", 0)) && (OrderGetTargetType(UnitOrder(gv_basic01Marine, 0)) == c_orderTargetPoint) && (DistanceBetweenPoints(PointFromId(6), OrderGetTargetPoint(UnitOrder(gv_basic01Marine, 0))) < 2.0)) {
        gf_DestroyTutorialTextTag();
        if ((TriggerActiveCount(gt_BasicMoveUnitIntroQ) == 0)) {
            gf_StopReminderTimer();
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:4154

    else {
        gf_CreateRClickToMoveTag(gv_basicMoveUnitBeacon, 80);
        if ((TriggerActiveCount(gt_BasicMoveUnitIntroQ) == 0)) {
            gf_StartReminderTimer();
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:4414

        gf_TutorialUnpause();
        TransmissionClearAll();
        if ((TriggerActiveCount(gt_BasicAttackIntroQ) == 0)) {
            gf_StopReminderTimer();
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:4434

        else {
        }
        if ((TriggerActiveCount(gt_BasicAttackIntroQ) == 0)) {
            gf_StartReminderTimer();
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:4958

    TriggerEnable(TriggerGetCurrent(), false);
    CameraPan(gv_p01_USER, PointFromId(8), 2.0, -1, 10.0, false);
    if ((TriggerActiveCount(gt_BasicMinimapIntroQ) == 0)) {
        gf_SilenceQ();
        TriggerExecute(gt_BasicMinimapCameraResetQ, true, false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:5359

        gf_TutorialUnpause();
        TransmissionClearAll();
        if ((TriggerActiveCount(gt_BasicAttackGroupIntroQ) == 0)) {
            gf_StopReminderTimer();
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:5385

        else {
        }
        if ((TriggerActiveCount(gt_BasicAttackGroupIntroQ) == 0)) {
            gf_StartReminderTimer();
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:9285

        UnitGroupLoopEnd();
        if ((lv_validOrder == true)) {
            if ((TriggerActiveCount(gt_TerranFindScoutsQ) == 0)) {
                gf_StopReminderTimer();
            }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:9300

        }
        else {
            if ((TriggerActiveCount(gt_TerranFindScoutsQ) == 0)) {
                gf_StartReminderTimer();
            }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur02.sc2mapMapScript.galaxy:3135

    }
    else {
        if ((TriggerActiveCount(gt_TMakeAssimilatorIntro1Q) == 0) && (TriggerActiveCount(gt_TMakeAssimilatorIntro2Q) == 0)) {
            UISetButtonFaceHighlighted(PlayerGroupAll(), "Assimilator", true);
            TriggerEnable(gt_TMakeAssimilatorTargeting, true);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur02.sc2mapMapScript.galaxy:3135

    }
    else {
        if ((TriggerActiveCount(gt_TMakeAssimilatorIntro1Q) == 0) && (TriggerActiveCount(gt_TMakeAssimilatorIntro2Q) == 0)) {
            UISetButtonFaceHighlighted(PlayerGroupAll(), "Assimilator", true);
            TriggerEnable(gt_TMakeAssimilatorTargeting, true);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:4079

    // Automatic Variable Declarations
    // Implementation
    if (((TriggerActiveCount(libVoiC_gt_PC_WaitForCutscene) > 0) || (TriggerActiveCount(libVoiC_gt_PC_WaitForDialogCutscene) > 0))) {
        TriggerStop(libVoiC_gt_PC_WaitForCutscene);
        TriggerStop(libVoiC_gt_PC_WaitForDialogCutscene);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:4079

    // Automatic Variable Declarations
    // Implementation
    if (((TriggerActiveCount(libVoiC_gt_PC_WaitForCutscene) > 0) || (TriggerActiveCount(libVoiC_gt_PC_WaitForDialogCutscene) > 0))) {
        TriggerStop(libVoiC_gt_PC_WaitForCutscene);
        TriggerStop(libVoiC_gt_PC_WaitForDialogCutscene);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:3240

    }

    if ((TriggerActiveCount(libVCST_gt_PS_ConversationWaitForSkip) > 0)) {
        TriggerStop(libVCST_gt_PS_ConversationWaitForSkip);
        if (((lp_fadeStyle & libVCST_ge_PS_FadeStyle_FadeOutAfter) != 0)) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/AILib.galaxy:1332

    }

    if ((TriggerActiveCount(libAIAI_gt_HeroAIUpdateTalentSelection) == 0)) {
        TriggerExecute(libAIAI_gt_HeroAIUpdateTalentSelection, true, false);
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:6591

            libAIAI_gf_HeroAIUpdateAIStatus(lv_playerIndex);
        }
        if ((TriggerActiveCount(libAIAI_gt_HeroAIUpdateDebugDisplay) == 0)) {
            TriggerExecute(libAIAI_gt_HeroAIUpdateDebugDisplay, true, false);
        }

mods/missionpacks/campaigncommon.sc2modbase.sc2data/LibComC.galaxy:1719

void libComC_gf_CampaignStopCutscene () {
    // Implementation
    if (((TriggerActiveCount(libComC_gt_CC_WaitForCutscene) > 0) || (TriggerActiveCount(libComC_gt_CC_WaitForDialogCutscene) > 0))) {
        TriggerStop(libComC_gt_CC_WaitForCutscene);
        TriggerStop(libComC_gt_CC_WaitForDialogCutscene);

mods/missionpacks/campaigncommon.sc2modbase.sc2data/LibComC.galaxy:1719

void libComC_gf_CampaignStopCutscene () {
    // Implementation
    if (((TriggerActiveCount(libComC_gt_CC_WaitForCutscene) > 0) || (TriggerActiveCount(libComC_gt_CC_WaitForDialogCutscene) > 0))) {
        TriggerStop(libComC_gt_CC_WaitForCutscene);
        TriggerStop(libComC_gt_CC_WaitForDialogCutscene);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:2813

    }

    if ((TriggerActiveCount(libNCST_gt_NS_ConversationWaitForSkip) > 0)) {
        TriggerStop(libNCST_gt_NS_ConversationWaitForSkip);
        if (((lp_fadeStyle & libNCST_ge_NS_FadeStyle_FadeOutAfter) != 0)) {

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova03.sc2map/MapScript.galaxy:2213

        }

        if (!((TriggerActiveCount(gt_DebugStage2FindIntel) == 0))) {
            return false;
        }

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova03.sc2mapMapScript.galaxy:2213

        }

        if (!((TriggerActiveCount(gt_DebugStage2FindIntel) == 0))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:10543


    // Implementation
    if ((TriggerActiveCount(libCOMI_gt_CM_TransmissionSend) == 0)) {
        return ;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:22367


    UnitGroupAdd(libCOMI_gv_cM_Mengsk_ReturningWorkers, EventUnit());
    if ((TriggerActiveCount(TriggerGetCurrent()) > 1)) {
        return true;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:22517

    }

    if ((TriggerActiveCount(TriggerGetCurrent()) > 1)) {
        return true;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:10050

    // Conditions
    if (testConds) {
        if (!((TriggerActiveCount(TriggerGetCurrent()) <= 1))) {
            return false;
        }