# Enable/Disable Selection Type

Grammardisable|Enable/Disable selectionType for playerGroup
FlagsNative | Action

If a Selection Type is disabled the player may not use that Selection Type to change their selected unit(s).

# Arguments

Returns — void

native void UISetSelectionTypeEnabled(
	playergroup inPlayers,
	int inSelectionType,
	bool inEnabled,
);

Category: UI / Game UI

# Examples

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

    libNtve_gf_SetDialogItemStyle(gv_friendlyFireDirectiveText, lv_textStyle, PlayerGroupAll());
    DialogSetVisible(gv_friendlyFireDirective, PlayerGroupAll(), true);
    UISetSelectionTypeEnabled(PlayerGroupSingle(gv_p01_USER), c_localSelectionTypeUnknown, false);
    gf_TutorialPause();
    TriggerEnable(gt_FriendlyFireHelperUnpauser, true);

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

    UnitGroupLoopEnd();
    DialogSetVisible(gv_friendlyFireDirective, PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupSingle(gv_p01_USER), c_localSelectionTypeUnknown, true);
    gf_TutorialUnpause();
    return true;

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

    libNtve_gf_SetDialogItemStyle(gv_moveOrderDirectiveText, lv_textStyle, PlayerGroupAll());
    DialogSetVisible(gv_moveOrderDirective, PlayerGroupAll(), true);
    UISetSelectionTypeEnabled(PlayerGroupSingle(gv_p01_USER), c_localSelectionTypeUnknown, false);
    gf_TutorialPause();
    TriggerEnable(gt_MoveCommandHelperUnpauser, true);

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

    UnitGroupLoopEnd();
    DialogSetVisible(gv_moveOrderDirective, PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupSingle(gv_p01_USER), c_localSelectionTypeUnknown, true);
    gf_TutorialUnpause();
    return true;

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

    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeArmyButton, true);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeControlGroupPanel, true);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
    CameraLockInput(gv_p01_USER, false);
    CameraSetBounds(PlayerGroupAll(), RegionEntireMap(), true);

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


    TriggerQueueEnter();
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    libVCMI_gf_SetScreenModeCampaign(c_uiModeConsole, c_transitionDurationDefault);
    Wait(2.0, c_timeGame);

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

    libNtve_gf_SetAllSoundChannelVolumes(libNtve_ge_VolumeChannelMode_Speech, PlayerGroupAll(), 0.0);
    libVCMI_gf_SendTransmissionCampaign(null, "Tutorial_SC2Core|Line00020", c_transmissionDurationAdd, 0.0, false, libVCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libVCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
    libNtve_gf_MakeUnitUncommandable(gv_basic01Marine, true);
    UnitIssueOrder(gv_basic01Marine, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(7)), c_orderQueueReplace);

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


    gf_BasicDragSelectCleanup();
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    TriggerExecute(gt_BasicDragSelectCompleteQ, true, true);
    TriggerExecute(gt_BasicAttackGroup, true, false);

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

    libNtve_gf_SetDialogItemStyle(gv_friendlyFireDirectiveText, lv_textStyle, PlayerGroupAll());
    DialogSetVisible(gv_friendlyFireDirective, PlayerGroupAll(), true);
    UISetSelectionTypeEnabled(PlayerGroupSingle(gv_p01_USER), c_localSelectionTypeUnknown, false);
    gf_TutorialPause();
    TriggerEnable(gt_FriendlyFireHelperUnpauser, true);

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

    UnitGroupLoopEnd();
    DialogSetVisible(gv_friendlyFireDirective, PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupSingle(gv_p01_USER), c_localSelectionTypeUnknown, true);
    gf_TutorialUnpause();
    return true;

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

    libNtve_gf_SetDialogItemStyle(gv_moveOrderDirectiveText, lv_textStyle, PlayerGroupAll());
    DialogSetVisible(gv_moveOrderDirective, PlayerGroupAll(), true);
    UISetSelectionTypeEnabled(PlayerGroupSingle(gv_p01_USER), c_localSelectionTypeUnknown, false);
    gf_TutorialPause();
    TriggerEnable(gt_MoveCommandHelperUnpauser, true);

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

    UnitGroupLoopEnd();
    DialogSetVisible(gv_moveOrderDirective, PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupSingle(gv_p01_USER), c_localSelectionTypeUnknown, true);
    gf_TutorialUnpause();
    return true;

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

    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeArmyButton, true);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeControlGroupPanel, true);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
    CameraLockInput(gv_p01_USER, false);
    CameraSetBounds(PlayerGroupAll(), RegionEntireMap(), true);

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


    TriggerQueueEnter();
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    libVCMI_gf_SetScreenModeCampaign(c_uiModeConsole, c_transitionDurationDefault);
    Wait(2.0, c_timeGame);

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

    libNtve_gf_SetAllSoundChannelVolumes(libNtve_ge_VolumeChannelMode_Speech, PlayerGroupAll(), 0.0);
    libVCMI_gf_SendTransmissionCampaign(null, "Tutorial_SC2Core|Line00020", c_transmissionDurationAdd, 0.0, false, libVCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libVCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
    libNtve_gf_MakeUnitUncommandable(gv_basic01Marine, true);
    UnitIssueOrder(gv_basic01Marine, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(7)), c_orderQueueReplace);

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


    gf_BasicDragSelectCleanup();
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    TriggerExecute(gt_BasicDragSelectCompleteQ, true, true);
    TriggerExecute(gt_BasicAttackGroup, true, false);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6656

        libNtve_gf_HideGameUI(false, PlayerGroupAll());
        UISetDragSelectEnabled(PlayerGroupAll(), false);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
        CameraFollowUnitGroup(1, UnitLastCreatedGroup(), true, false);
        CameraForceFollowUnitGroup(1, true);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6667

    else {
        UISetDragSelectEnabled(PlayerGroupAll(), true);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
        UnitKill(libVCMI_gv_pM_FlyoverUnit);
        CameraLockInput(1, false);

mods/frontiers.sc2modbase.sc2data/Lib6CB3363F.galaxy:346

    PlayerGroupAdd(lib6CB3363F_gv_fT_PlayerGroup, 4);
    libNtve_gf_SetPlayerGroupAlliance(lib6CB3363F_gv_fT_PlayerGroup, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeAchievementMenuButton, false);

mods/frontiers.sc2modbase.sc2data/Lib6CB3363F.galaxy:2157

    }

    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
    return true;
}

mods/frontiers.sc2modbase.sc2data/Lib6CB3363F.galaxy:2178

    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeCommandPanel, true);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeConsolePanel, true);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
    return true;
}

mods/heroesbrawlmods/arenamodemods/arenamode.stormmodbase.stormdata/LibAREN.galaxy:424

    TriggerEnable(libUIUI_gt_DeathTimerPanelUpdate, true);
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    libGame_gf_AddCameraBoundsStorm(libAREN_gv_aRM_MechanicData[libAREN_gf_ArenaCurrentMechanicId()].lv_cameraBoundsRegion);
    lv_itPlayer = 1;

mods/heroesbrawlmods/arenamodemods/attackdefend.stormmodbase.stormdata/LibAtDe.galaxy:424

    // Implementation
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    libIGHS_gf_ShufflePickDebugMessage(StringExternal("Param/Value/lib_AtDe_A22E1F27"));
    lv_itPlayer = 1;

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

    if ((EventUnitBehaviorChange() == c_unitBehaviorChangeActivate)) {
        DialogControlFadeTransparency(libUIUI_gv_fullscreenOverlaysPanel.lv_abathurSymbioteOverlay, PlayerGroupSingle(lv_player), 0.5, 0.0);
        UISetSelectionTypeEnabled(PlayerGroupSingle(lv_player), c_localSelectionTypeWorldPanelHero, false);
    }
    else {

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

    else {
        DialogControlFadeTransparency(libUIUI_gv_fullscreenOverlaysPanel.lv_abathurSymbioteOverlay, PlayerGroupSingle(lv_player), 0.5, 100.0);
        UISetSelectionTypeEnabled(PlayerGroupSingle(lv_player), c_localSelectionTypeWorldPanelHero, true);
    }
    return true;

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

    }

    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_chenPlayer), c_localSelectionTypeWorldPanelHero, false);
    while ((UnitHasBehavior2(lv_chen, "StormEarthFireCasterBehavior") == true)) {
        if ((UnitIsAlive(libGDHL_gv_heroChenStormEarthFireUnits[lv_chenPlayer].lv_controlStoreUnit) == true)) {

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

        Wait(0.0625, c_timeGame);
    }
    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_chenPlayer), c_localSelectionTypeWorldPanelHero, true);
    return true;
}

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

    lv_lVController = EventUnitCreatedUnit();
    AIRemovePlayerUnit(lv_lVController);
    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_lVPlayer), c_localSelectionTypeUnknown, true);
    UISetDragSelectEnabled(PlayerGroupSingle(lv_lVPlayer), true);
    UISetFrameVisible(PlayerGroupSingle(lv_lVPlayer), c_syncFrameTypeControlGroupPanel, true);

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

    }
    UnitBehaviorAdd(lv_createdUnit, "MapMechanicStack", lv_creatingUnit, UnitBehaviorCount(lv_creatingUnit, "MapMechanicStack"));
    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_ownerOfCreatedUnit), c_localSelectionTypeWorldPanelHero, false);
    UnitSetFacing(lv_createdUnit, UnitGetFacing(lv_creatingUnit), 0.0);
    UnitSetPropertyFixed(lv_createdUnit, c_unitPropXP, UnitXPTotal(lv_creatingUnit));

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

        Wait(0.125, c_timeGame);
    }
    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_ownerOfCreatedUnit), c_localSelectionTypeWorldPanelHero, true);
    return true;
}

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

    }

    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_rexxarPlayer), c_localSelectionTypeWorldPanelHero, false);
    return true;
}

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

        UnitDestroyAIThinkTree(lv_misha);
    }
    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_rexxarPlayer), c_localSelectionTypeWorldPanelHero, true);
    return true;
}

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

        libSprt_gv_dEBUGSelectionEnabled = true;
        UISetDragSelectEnabled(PlayerGroupAll(), true);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
        libNtve_gf_SetDialogItemChecked(libUIUI_gv_uIDebugPanel.lv_selectionEnabledCheckbox, true, PlayerGroupAll());
        TriggerDebugOutput(1, StringExternal("Param/Value/lib_Sprt_76A66534"), true);

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

        libSprt_gv_dEBUGSelectionEnabled = false;
        UISetDragSelectEnabled(PlayerGroupAll(), false);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
        libNtve_gf_SetDialogItemChecked(libUIUI_gv_uIDebugPanel.lv_selectionEnabledCheckbox, false, PlayerGroupAll());
        TriggerDebugOutput(1, StringExternal("Param/Value/lib_Sprt_991AD450"), true);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:8759

    UISetBattleNetButtonOffset(PlayerGroupAll(), 280, 0);
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeWorldPanelHero, true);
    PingSetPlayerPingsShown(libCore_gv_activeHumanPlayers, false);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:8760

    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeWorldPanelHero, true);
    PingSetPlayerPingsShown(libCore_gv_activeHumanPlayers, false);
    UISetGameMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogRestartButton, false);

mods/heromods/medivh.stormmodbase.stormdata/LibHMDV.galaxy:570

    lv_portalCaster = EventPlayerEffectUsedUnit(c_effectUnitCaster);
    UnitSelect(lv_markerPortal, UnitGetOwner(lv_portalCaster), true);
    UISetSelectionTypeEnabled(PlayerGroupSingle(UnitGetOwner(lv_portalCaster)), c_localSelectionTypeWorldPanelHero, false);
    while ((UnitIsAlive(lv_markerPortal) == true)) {
        Wait(0.125, c_timeGame);

mods/heromods/medivh.stormmodbase.stormdata/LibHMDV.galaxy:574

        Wait(0.125, c_timeGame);
    }
    UISetSelectionTypeEnabled(PlayerGroupSingle(UnitGetOwner(lv_portalCaster)), c_localSelectionTypeWorldPanelHero, true);
    return true;
}

mods/heromods/samuro.stormmodbase.stormdata/LibHSAM.galaxy:227

    UnitControlGroupAddUnit(lv_samuroPlayer, 1, lv_samuro);
    UnitControlGroupAddUnit(lv_samuroPlayer, 4, lv_samuro);
    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_samuroPlayer), c_localSelectionTypeUnknown, true);
    UISetDragSelectEnabled(PlayerGroupSingle(lv_samuroPlayer), true);
    UISetFrameVisible(PlayerGroupSingle(lv_samuroPlayer), c_syncFrameTypeControlGroupPanel, true);

mods/heromods/samuro.stormmodbase.stormdata/LibHSAM.galaxy:1882

        UnitBehaviorAdd(UnitGroupUnit(libHSAM_gv_mirrorImageUnitGroup[lv_samuroPlayer], 1), "Ultimate2Unlocked", libGame_gv_players[lv_samuroPlayer].lv_heroUnit, UnitBehaviorCount(lv_samuro, "Ultimate2Unlocked"));
        UnitBehaviorAdd(UnitGroupUnit(libHSAM_gv_mirrorImageUnitGroup[lv_samuroPlayer], 2), "Ultimate2Unlocked", libGame_gv_players[lv_samuroPlayer].lv_heroUnit, UnitBehaviorCount(lv_samuro, "Ultimate2Unlocked"));
        UISetSelectionTypeEnabled(PlayerGroupSingle(lv_samuroPlayer), c_localSelectionTypeUnknown, true);
        UISetDragSelectEnabled(PlayerGroupSingle(lv_samuroPlayer), true);
        UISetFrameVisible(PlayerGroupSingle(lv_samuroPlayer), c_syncFrameTypeControlGroupPanel, true);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:5775

        libNtve_gf_HideGameUI(false, PlayerGroupAll());
        UISetDragSelectEnabled(PlayerGroupAll(), false);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
        CameraFollowUnitGroup(1, UnitLastCreatedGroup(), true, false);
        CameraForceFollowUnitGroup(1, true);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:5786

    else {
        UISetDragSelectEnabled(PlayerGroupAll(), true);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
        UnitKill(libNCMI_gv_NM_FlyoverUnit);
        CameraLockInput(1, false);

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova01.sc2map/MapScript.galaxy:2885

    }

    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    libNtve_gf_SetAllianceOneWay(gv_pLAYER_02_DOMINION2, gv_pLAYER_01_USER, libNtve_ge_AllianceSetting_Neutral);
    UnitSelect(gv_artanis, gv_pLAYER_01_USER, true);

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova01.sc2mapMapScript.galaxy:2885

    }

    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    libNtve_gf_SetAllianceOneWay(gv_pLAYER_02_DOMINION2, gv_pLAYER_01_USER, libNtve_ge_AllianceSetting_Neutral);
    UnitSelect(gv_artanis, gv_pLAYER_01_USER, true);