# Select List Item

Grammar — Select item index of list for players
FlagsNative | Action

Selects the specified list index for the specified dialog.

# Arguments

  • int<control> — List
  • playergroup — Players
  • int — Index

Returns — void

native void DialogControlSelectItem(
	int control,
	playergroup players,
	int index,
);

Category: Dialog / Dialog Item Values

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10532

    for ( ; ( (autoF7334389_ai >= 0 && lv_index <= autoF7334389_ae) || (autoF7334389_ai <= 0 && lv_index >= autoF7334389_ae) ) ; lv_index += autoF7334389_ai ) {
        if ((gv_zPlanetPanel_DropdownDifficultyIndexToDifficulty[lv_index] == PlayerDifficulty(1))) {
            DialogControlSelectItem(gv_zPlanetPanel_DropdownDifficulty, PlayerGroupAll(), lv_index);
            break;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10532

    for ( ; ( (autoF7334389_ai >= 0 && lv_index <= autoF7334389_ae) || (autoF7334389_ai <= 0 && lv_index >= autoF7334389_ae) ) ; lv_index += autoF7334389_ai ) {
        if ((gv_zPlanetPanel_DropdownDifficultyIndexToDifficulty[lv_index] == PlayerDifficulty(1))) {
            DialogControlSelectItem(gv_zPlanetPanel_DropdownDifficulty, PlayerGroupAll(), lv_index);
            break;
        }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:14433

    TriggerEnable(libSwaC_gt_ZS_VSRestartCancel, true);
    TriggerEnable(libSwaC_gt_ZS_VSRestartRestart, true);
    DialogControlSelectItem(libSwaC_gv_zS_VSRestartDifficultyPulldown, PlayerGroupAll(), libSwaC_gf_ZS_DifficultyIndex(PlayerDifficulty(1)));
    DialogControlSetVisible(libSwaC_gv_zS_VSRestartPanel, PlayerGroupAll(), true);
    DialogControlSetVisible(libSwaC_gv_zS_VSMainPanel, PlayerGroupAll(), false);

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

    lib281DEC45_gf_ZSS_CharacterDataUpdate();
    if ((DialogControlGetSelectedItem(lib281DEC45_gv_zSS_DebugStoryTypeList, 1) == 0)) {
        DialogControlSelectItem(lib281DEC45_gv_zSS_DebugStoryTypeList, PlayerGroupAll(), 1);
    }
    else {

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

    }
    if ((DialogControlGetSelectedItem(lib281DEC45_gv_zSS_DebugStoryStateList, 1) == 0)) {
        DialogControlSelectItem(lib281DEC45_gv_zSS_DebugStoryStateList, PlayerGroupAll(), 1);
    }
    else {

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

                lv_typeIndex += 1;
                if ((lib281DEC45_gv_zSSX_DebugStoryScene != null) && (lib281DEC45_gv_zSSX_DebugStoryScene == lv_indexScene)) {
                    DialogControlSelectItem(lib281DEC45_gv_zSS_DebugStorySceneList, PlayerGroupAll(), lv_typeIndex);
                    lib281DEC45_gv_zSSX_DebugStoryScene = null;
                }

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

    auto37DA3AF5_val = PlayerDifficulty(1);
    if (auto37DA3AF5_val == 1) {
        DialogControlSelectItem(lib281DEC45_gv_zSS_MissionDifficultyDropdown, PlayerGroupAll(), 1);
    }
    else if (auto37DA3AF5_val == 2) {

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

    }
    else if (auto37DA3AF5_val == 2) {
        DialogControlSelectItem(lib281DEC45_gv_zSS_MissionDifficultyDropdown, PlayerGroupAll(), 2);
    }
    else if (auto37DA3AF5_val == 3) {

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

    }
    else if (auto37DA3AF5_val == 3) {
        DialogControlSelectItem(lib281DEC45_gv_zSS_MissionDifficultyDropdown, PlayerGroupAll(), 3);
    }
    else if (auto37DA3AF5_val == 4) {

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

    }
    else if (auto37DA3AF5_val == 4) {
        DialogControlSelectItem(lib281DEC45_gv_zSS_MissionDifficultyDropdown, PlayerGroupAll(), 4);
    }
    else {

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

    TriggerEnable(libVCST_gt_PS_DebugStoryCheatCheckbox, true);
    if ((libVCST_gv_pS_DebugStorySelectedIndex != 0)) {
        DialogControlSelectItem(libVCST_gv_pS_DebugStorySceneList, PlayerGroupAll(), libVCST_gv_pS_DebugStorySelectedIndex);
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:5743

    TriggerEnable(libVCUI_gt_PU_VictoryRestartCancel, true);
    TriggerEnable(libVCUI_gt_PU_VictoryRestartRestart, true);
    DialogControlSelectItem(libVCUI_gv_pU_VSRestartDifficultyPulldown, PlayerGroupAll(), libVoiC_gf_PC_DifficultyIndex(PlayerDifficulty(1)));
    DialogControlSetVisible(libVCUI_gv_pU_VSRestartPanel, PlayerGroupAll(), true);
    DialogControlSetVisible(libVCUI_gv_pU_VSMainPanel, PlayerGroupAll(), false);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7400

    auto72FB2041_val = PlayerDifficulty(1);
    if (auto72FB2041_val == 1) {
        DialogControlSelectItem(libVCUI_gv_pU_MissionDifficultyDropdown, PlayerGroupAll(), 1);
    }
    else if (auto72FB2041_val == 2) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7403

    }
    else if (auto72FB2041_val == 2) {
        DialogControlSelectItem(libVCUI_gv_pU_MissionDifficultyDropdown, PlayerGroupAll(), 2);
    }
    else if (auto72FB2041_val == 3) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7406

    }
    else if (auto72FB2041_val == 3) {
        DialogControlSelectItem(libVCUI_gv_pU_MissionDifficultyDropdown, PlayerGroupAll(), 3);
    }
    else if (auto72FB2041_val == 4) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7409

    }
    else if (auto72FB2041_val == 4) {
        DialogControlSelectItem(libVCUI_gv_pU_MissionDifficultyDropdown, PlayerGroupAll(), 4);
    }
    else {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7572

    autoFF646F7D_val = PlayerDifficulty(1);
    if (autoFF646F7D_val == 1) {
        DialogControlSelectItem(libVCUI_gv_pU_MissionDifficultyDropdown, PlayerGroupAll(), 1);
    }
    else if (autoFF646F7D_val == 2) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7575

    }
    else if (autoFF646F7D_val == 2) {
        DialogControlSelectItem(libVCUI_gv_pU_MissionDifficultyDropdown, PlayerGroupAll(), 2);
    }
    else if (autoFF646F7D_val == 3) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7578

    }
    else if (autoFF646F7D_val == 3) {
        DialogControlSelectItem(libVCUI_gv_pU_MissionDifficultyDropdown, PlayerGroupAll(), 3);
    }
    else if (autoFF646F7D_val == 4) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7581

    }
    else if (autoFF646F7D_val == 4) {
        DialogControlSelectItem(libVCUI_gv_pU_MissionDifficultyDropdown, PlayerGroupAll(), 4);
    }
    else {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7685

    autoDC0EC3D2_val = PlayerDifficulty(1);
    if (autoDC0EC3D2_val == 1) {
        DialogControlSelectItem(libVCUI_gv_pU_MissionDifficultyDropdown, PlayerGroupAll(), 1);
    }
    else if (autoDC0EC3D2_val == 2) {

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/%2810%29trymemode.stormmap/MapScript.galaxy:783


    }
    DialogControlSelectItem(gv_tryMeModePanel.lv_changeAllyPulldown, PlayerGroupAll(), lv_currentIndex);
    Wait(0.25, c_timeGame);
    DialogControlSetSize(gv_tryMeModePanel.lv_changeAllyPulldown, PlayerGroupAll(), 280, 50);

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/%2810%29trymemode.stormmap/MapScript.galaxy:825


    }
    DialogControlSelectItem(gv_tryMeModePanel.lv_changeEnemyPulldown, PlayerGroupAll(), lv_currentIndex);
    Wait(0.25, c_timeGame);
    DialogControlSetSize(gv_tryMeModePanel.lv_changeEnemyPulldown, PlayerGroupAll(), 280, 50);

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/(10)trymemode.stormmapmap/MapScript.galaxy:783


    }
    DialogControlSelectItem(gv_tryMeModePanel.lv_changeAllyPulldown, PlayerGroupAll(), lv_currentIndex);
    Wait(0.25, c_timeGame);
    DialogControlSetSize(gv_tryMeModePanel.lv_changeAllyPulldown, PlayerGroupAll(), 280, 50);

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/(10)trymemode.stormmapmap/MapScript.galaxy:825


    }
    DialogControlSelectItem(gv_tryMeModePanel.lv_changeEnemyPulldown, PlayerGroupAll(), lv_currentIndex);
    Wait(0.25, c_timeGame);
    DialogControlSetSize(gv_tryMeModePanel.lv_changeEnemyPulldown, PlayerGroupAll(), 280, 50);

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


    }
    DialogControlSelectItem(DialogControlLastCreated(), PlayerGroupAll(), 1);
    libSprt_gv_qACheatsControlsPanel.lv_behaviorListPulldown = DialogControlLastCreated();
}

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


    }
    DialogControlSelectItem(DialogControlLastCreated(), PlayerGroupAll(), 1);
    libSprt_gv_qACheatsControlsPanel.lv_spawnUnitListPulldown = DialogControlLastCreated();
}

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


    }
    DialogControlSelectItem(DialogControlLastCreated(), PlayerGroupAll(), 1);
    libSprt_gv_qACheatsControlsPanel.lv_spawnItemListPulldown = DialogControlLastCreated();
    DialogControlCreate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeEditBox);

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

        DialogControlAddItem(libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompDropdown, PlayerGroupAll(), libCore_gv_dataMinionWaveCompositions[lv_itMinionComp].lv_name);
    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompDropdown, PlayerGroupAll(), 1);
}

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

        lv_heroIndex = libCore_gf_LoadBankValueIfExistsAsInteger(lv_heroIndex, libGame_gv_players[1].lv_bankData.lv_bank, "HeroIndex", "Debug Menu Options");
        if ((lv_heroIndex != 0)) {
            DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, PlayerGroupSingle(1), lv_heroIndex);
            TriggerWaitForTrigger(libUIUI_gt_UIDebugPanelHeroDropdownSelectionChange, true);
        }

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

        lv_skinIndex = libCore_gf_LoadBankValueIfExistsAsInteger(lv_skinIndex, libGame_gv_players[1].lv_bankData.lv_bank, "SkinIndex", "Debug Menu Options");
        if ((lv_skinIndex != 0)) {
            DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_skinDropdown, PlayerGroupSingle(1), lv_skinIndex);
            TriggerWaitForTrigger(libUIUI_gt_UIDebugPanelSkinDropdownSelectionChange, true);
        }

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

        lv_mountIndex = libCore_gf_LoadBankValueIfExistsAsInteger(lv_mountIndex, libGame_gv_players[1].lv_bankData.lv_bank, "MountIndex", "Debug Menu Options");
        if ((lv_mountIndex != 0)) {
            DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_mountTypeDropdown, PlayerGroupSingle(1), lv_mountIndex);
            TriggerWaitForTrigger(libUIUI_gt_UIDebugPanelMountTypeDropdownSelectionChange, true);
        }

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

        lv_variationIndex = libCore_gf_LoadBankValueIfExistsAsInteger(lv_variationIndex, libGame_gv_players[1].lv_bankData.lv_bank, "MountVariation", "Debug Menu Options");
        if ((lv_mountIndex != 0)) {
            DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_mountVariationDropdown, PlayerGroupSingle(1), lv_variationIndex);
        }

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

        DialogControlAddItem(libUIUI_gv_uIDebugPanel.lv_voiceLineRadioHeroDropdown, libCore_gv_playerGroupFromPlayer[lp_player], StringExternal(("Hero/Name/" + DataTableGetString(true, ("HeroIndex_" + IntToString(lv_itHeroIndex))))));
    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_voiceLineRadioHeroDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
}

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

    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_voiceLineRadioHeroDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
}

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


    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_skinDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
}

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

        DialogControlAddItem(libUIUI_gv_uIDebugPanel.lv_mountTypeDropdown, libCore_gv_playerGroupFromPlayer[lp_player], TextExpressionAssemble("Param/Expression/lib_UIUI_FCFB9990"));
    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_mountTypeDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
}

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


    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_mountBaseDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
}

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

    TriggerEnable(libNCST_gt_NS_DebugStoryCheatCheckbox, true);
    if ((libNCST_gv_nS_DebugStorySelectedIndex != 0)) {
        DialogControlSelectItem(libNCST_gv_nS_DebugStorySceneList, PlayerGroupAll(), libNCST_gv_nS_DebugStorySelectedIndex);
    }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:972

    auto0C0878CB_val = PlayerDifficulty(1);
    if (auto0C0878CB_val == 1) {
        DialogControlSelectItem(libNCUI_gv_nU_MissionDifficultyDropdown, PlayerGroupAll(), 1);
    }
    else if (auto0C0878CB_val == 2) {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:975

    }
    else if (auto0C0878CB_val == 2) {
        DialogControlSelectItem(libNCUI_gv_nU_MissionDifficultyDropdown, PlayerGroupAll(), 2);
    }
    else if (auto0C0878CB_val == 3) {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:978

    }
    else if (auto0C0878CB_val == 3) {
        DialogControlSelectItem(libNCUI_gv_nU_MissionDifficultyDropdown, PlayerGroupAll(), 3);
    }
    else if (auto0C0878CB_val == 4) {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:981

    }
    else if (auto0C0878CB_val == 4) {
        DialogControlSelectItem(libNCUI_gv_nU_MissionDifficultyDropdown, PlayerGroupAll(), 4);
    }
    else {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:3998

    TriggerEnable(libNCUI_gt_NU_VictoryRestartCancel, true);
    TriggerEnable(libNCUI_gt_NU_VictoryRestartRestart, true);
    DialogControlSelectItem(libNCUI_gv_NU_VSRestartDifficultyPulldown, PlayerGroupAll(), libComC_gf_CC_DifficultyIndex(PlayerDifficulty(1)));
    DialogControlSetVisible(libNCUI_gv_NU_VSRestartPanel, PlayerGroupAll(), true);
    DialogControlSetVisible(libNCUI_gv_NU_VSMainPanel, PlayerGroupAll(), false);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:897


    }
    DialogControlSelectItem(libCOUI_gv_cU_CommanderMutatorChallengePulldown, PlayerGroupAll(), 1);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:1878

    }

    DialogControlSelectItem(libCOUI_gv_cU_CustomMutatorSpeedDropDown, PlayerGroupAll(), libCOMI_gf_MinimumDifficultyValueCoopInteger(2, 2, 2, 1, 1, 1));
    TriggerEnable(libCOUI_gt_CU_CustomMutatorSpeedChange, true);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:7761

    }

    DialogControlSelectItem(libCOUI_gv_cU_CustomMutatorSpeedDropDown, PlayerGroupSingle(2), DialogControlGetSelectedItem(libCOUI_gv_cU_CustomMutatorSpeedDropDown, 1));
    return true;
}

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:7172

    TriggerEnable(libA3DDD02B_gt_PP_VSRestartCancel, true);
    TriggerEnable(libA3DDD02B_gt_PP_VSRestartRestart, true);
    DialogControlSelectItem(libA3DDD02B_gv_pU_VSRestartDifficultyPulldown, PlayerGroupAll(), libA3DDD02B_gf_PP_DifficultyIndex(PlayerDifficulty(1)));
    DialogControlSetVisible(libA3DDD02B_gv_pU_VSRestartPanel, PlayerGroupAll(), true);
    DialogControlSetVisible(libA3DDD02B_gv_pU_VSMainPanel, PlayerGroupAll(), false);

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:9104

    auto6DCDC065_val = PlayerDifficulty(1);
    if (auto6DCDC065_val == 1) {
        DialogControlSelectItem(libA3DDD02B_gv_pP_MLDifficultyPulldown, PlayerGroupAll(), 1);
    }
    else if (auto6DCDC065_val == 2) {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:9107

    }
    else if (auto6DCDC065_val == 2) {
        DialogControlSelectItem(libA3DDD02B_gv_pP_MLDifficultyPulldown, PlayerGroupAll(), 2);
    }
    else if (auto6DCDC065_val == 3) {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:9110

    }
    else if (auto6DCDC065_val == 3) {
        DialogControlSelectItem(libA3DDD02B_gv_pP_MLDifficultyPulldown, PlayerGroupAll(), 3);
    }
    else if (auto6DCDC065_val == 4) {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:9113

    }
    else if (auto6DCDC065_val == 4) {
        DialogControlSelectItem(libA3DDD02B_gv_pP_MLDifficultyPulldown, PlayerGroupAll(), 4);
    }
    else {