# Trigger Active Count
Grammar — Number of active instances of t
Flags —Native
|Function
Returns the number of instances of the specified trigger which are currently executing.
# Arguments
trigger
— Trigger
Returns — int
native int TriggerActiveCount(trigger t);
# Related
Category: Trigger / Basic
- Create Trigger From Trigger
- New Trigger —
trigger
— TriggerCreate - Run Trigger —
void
— TriggerExecute - Run Trigger By Name —
void
— libNtve_gf_TriggerExecuteByName - Stop Trigger —
void
— TriggerStop - Destroy Trigger —
void
— TriggerDestroy - Turn Trigger On/Off —
void
— TriggerEnable - Trigger Is On —
bool
— TriggerIsEnabled - Current Trigger —
trigger
— TriggerGetCurrent - Wait For Trigger —
void
— TriggerWaitForTrigger - Current Trigger Thread SetFlags —
void
— TriggerCurrentTriggerThreadSetFlags - Allow Trigger To Be Skipped —
void
— TriggerSkippableBegin - Player Skips Trigger —
void
— TriggerAddEventTriggerSkipped - Register Events — macro
- Send Generic Event —
void
— TriggerSendEvent - Generic Event —
void
— TriggerAddEventGeneric - Generic Event Parameter —
string
— TriggerEventParamName - Triggering Event Name —
string
— EventGenericName - Triggering Trigger —
trigger
— EventTrigger - Trigger Active Count —
int
— TriggerActiveCount - Trigger Execution Count —
int
— TriggerGetExecCount - Trigger Evaluation Count —
int
— TriggerGetEvalCount - Trigger Function Name —
string
— TriggerGetFunction - Evaluate Trigger Conditions —
bool
— TriggerEvaluate
# Examples
campaigns/swarmstoryutil.sc2mod — base.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.sc2campaign — base.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.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:4154
else {
gf_CreateRClickToMoveTag(gv_basicMoveUnitBeacon, 80);
if ((TriggerActiveCount(gt_BasicMoveUnitIntroQ) == 0)) {
gf_StartReminderTimer();
}
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:4414
gf_TutorialUnpause();
TransmissionClearAll();
if ((TriggerActiveCount(gt_BasicAttackIntroQ) == 0)) {
gf_StopReminderTimer();
}
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:4434
else {
}
if ((TriggerActiveCount(gt_BasicAttackIntroQ) == 0)) {
gf_StartReminderTimer();
}
campaigns/void.sc2campaign — base.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.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:5359
gf_TutorialUnpause();
TransmissionClearAll();
if ((TriggerActiveCount(gt_BasicAttackGroupIntroQ) == 0)) {
gf_StopReminderTimer();
}
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:5385
else {
}
if ((TriggerActiveCount(gt_BasicAttackGroupIntroQ) == 0)) {
gf_StartReminderTimer();
}
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:9285
UnitGroupLoopEnd();
if ((lv_validOrder == true)) {
if ((TriggerActiveCount(gt_TerranFindScoutsQ) == 0)) {
gf_StopReminderTimer();
}
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:9300
}
else {
if ((TriggerActiveCount(gt_TerranFindScoutsQ) == 0)) {
gf_StartReminderTimer();
}
campaigns/void.sc2campaign — base.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/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.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.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:4154
else {
gf_CreateRClickToMoveTag(gv_basicMoveUnitBeacon, 80);
if ((TriggerActiveCount(gt_BasicMoveUnitIntroQ) == 0)) {
gf_StartReminderTimer();
}
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:4414
gf_TutorialUnpause();
TransmissionClearAll();
if ((TriggerActiveCount(gt_BasicAttackIntroQ) == 0)) {
gf_StopReminderTimer();
}
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:4434
else {
}
if ((TriggerActiveCount(gt_BasicAttackIntroQ) == 0)) {
gf_StartReminderTimer();
}
campaigns/void.sc2campaign/base.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.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:5359
gf_TutorialUnpause();
TransmissionClearAll();
if ((TriggerActiveCount(gt_BasicAttackGroupIntroQ) == 0)) {
gf_StopReminderTimer();
}
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:5385
else {
}
if ((TriggerActiveCount(gt_BasicAttackGroupIntroQ) == 0)) {
gf_StartReminderTimer();
}
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:9285
UnitGroupLoopEnd();
if ((lv_validOrder == true)) {
if ((TriggerActiveCount(gt_TerranFindScoutsQ) == 0)) {
gf_StopReminderTimer();
}
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:9300
}
else {
if ((TriggerActiveCount(gt_TerranFindScoutsQ) == 0)) {
gf_StartReminderTimer();
}
campaigns/void.sc2campaign/base.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/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/voidstory.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.stormmod — base.stormdata/TriggerLibs/AILib.galaxy:1332
}
if ((TriggerActiveCount(libAIAI_gt_HeroAIUpdateTalentSelection) == 0)) {
TriggerExecute(libAIAI_gt_HeroAIUpdateTalentSelection, true, false);
}
mods/heroesdata.stormmod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2map — MapScript.galaxy:2213
}
if (!((TriggerActiveCount(gt_DebugStage2FindIntel) == 0))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:10543
// Implementation
if ((TriggerActiveCount(libCOMI_gt_CM_TransmissionSend) == 0)) {
return ;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:22367
UnitGroupAdd(libCOMI_gv_cM_Mengsk_ReturningWorkers, EventUnit());
if ((TriggerActiveCount(TriggerGetCurrent()) > 1)) {
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:22517
}
if ((TriggerActiveCount(TriggerGetCurrent()) > 1)) {
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:10050
// Conditions
if (testConds) {
if (!((TriggerActiveCount(TriggerGetCurrent()) <= 1))) {
return false;
}