# Target Mode State

Grammar — Target Mode State
FlagsNative | Function

Returns — int<preset::TargetModeState>

native int EventTargetModeState();

# Supported triggers

Category: UI / Game UI

# Examples

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn)) {
        if ((gv_terranMakeSupplyTargetModeActive == false)) {
            gv_terranMakeSupplyTargetModeActive = true;

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

    }

    if ((EventTargetModeAbilCmd() == AbilityCommand("TerranBuild", 3)) && (EventTargetModeState() == c_targetModeStateOn)) {
        if ((gv_terranMakeBarracksTargetModeActive == false)) {
            gv_terranMakeBarracksTargetModeActive = true;

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

    }
    else {
        if ((EventTargetModeState() == c_targetModeStateOn)) {
            TransmissionClearAll();
        }

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ZergBuild", 3))) {
        if ((gv_zergMakeSpawningPoolTargetModeActive == false)) {
            gv_zergMakeSpawningPoolTargetModeActive = true;

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ZergBuild", 2))) {
        if ((gv_zergMakeExtractorTargetModeActive == false)) {
            gv_zergMakeExtractorTargetModeActive = true;

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

    }
    else {
        if ((EventTargetModeState() == c_targetModeStateOn)) {
            TransmissionClearAll();
        }

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ZergBuild", 13))) {
        if ((gv_zergMakeRoachWarrenTargetModeActive == false)) {
            gv_zergMakeRoachWarrenTargetModeActive = true;

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

    }
    else {
        if ((EventTargetModeState() == c_targetModeStateOn)) {
            TransmissionClearAll();
        }

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ProtossBuild", 1))) {
        if ((gv_protossBuildPylonTargetModeActive == false)) {
            gv_protossBuildPylonTargetModeActive = true;

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ProtossBuild", 14))) {
        if ((gv_protossBuildCyberCoreTargetModeActive == false)) {
            gv_protossBuildCyberCoreTargetModeActive = true;

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ProtossBuild", 1))) {
        if ((UnitIsAlive(gv_tInvisHelper) == false)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Invisible2x2", 0, 0, PointFromId(250));

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ProtossBuild", 2))) {
        if ((UnitIsAlive(gv_tInvisHelper) == false)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Invisible3x3", c_unitCreateIgnorePlacement, 0, PointFromId(2338));

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn)) {
        if ((gv_terranMakeSupplyTargetModeActive == false)) {
            gv_terranMakeSupplyTargetModeActive = true;

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

    }

    if ((EventTargetModeAbilCmd() == AbilityCommand("TerranBuild", 3)) && (EventTargetModeState() == c_targetModeStateOn)) {
        if ((gv_terranMakeBarracksTargetModeActive == false)) {
            gv_terranMakeBarracksTargetModeActive = true;

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

    }
    else {
        if ((EventTargetModeState() == c_targetModeStateOn)) {
            TransmissionClearAll();
        }

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ZergBuild", 3))) {
        if ((gv_zergMakeSpawningPoolTargetModeActive == false)) {
            gv_zergMakeSpawningPoolTargetModeActive = true;

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ZergBuild", 2))) {
        if ((gv_zergMakeExtractorTargetModeActive == false)) {
            gv_zergMakeExtractorTargetModeActive = true;

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

    }
    else {
        if ((EventTargetModeState() == c_targetModeStateOn)) {
            TransmissionClearAll();
        }

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ZergBuild", 13))) {
        if ((gv_zergMakeRoachWarrenTargetModeActive == false)) {
            gv_zergMakeRoachWarrenTargetModeActive = true;

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

    }
    else {
        if ((EventTargetModeState() == c_targetModeStateOn)) {
            TransmissionClearAll();
        }

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ProtossBuild", 1))) {
        if ((gv_protossBuildPylonTargetModeActive == false)) {
            gv_protossBuildPylonTargetModeActive = true;

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ProtossBuild", 14))) {
        if ((gv_protossBuildCyberCoreTargetModeActive == false)) {
            gv_protossBuildCyberCoreTargetModeActive = true;

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ProtossBuild", 1))) {
        if ((UnitIsAlive(gv_tInvisHelper) == false)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Invisible2x2", 0, 0, PointFromId(250));

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

    }

    if ((EventTargetModeState() == c_targetModeStateOn) && (EventTargetModeAbilCmd() == AbilityCommand("ProtossBuild", 2))) {
        if ((UnitIsAlive(gv_tInvisHelper) == false)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Invisible3x3", c_unitCreateIgnorePlacement, 0, PointFromId(2338));

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:25241

    }

    if ((EventTargetModeState() == c_targetModeStateOn)) {
        auto7CB34C57_g = libGDHL_gv_heroZagaraNydusWormUnitGroup[EventPlayer()];
        auto7CB34C57_u = UnitGroupCount(auto7CB34C57_g, c_unitCountAll);