# Set Dialog Item Unit Group

Grammar — Set dialogItem unit group to unitGroup for players
FlagsAction

Sets the unit group for a dialog item. Only used by Command Panel dialog items.

# Arguments

  • int<control> — Dialog Item
  • unitgroup — Unit Group
  • playergroup — Players

Returns — void

void libNtve_gf_SetDialogItemUnitGroup(
	int lp_dialogItem,
	unitgroup lp_unitGroup,
	playergroup lp_players,
);

Category: Dialog / Dialog Item Tools

# Examples

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

    }
    UnitGroupAdd(libVCUI_gv_pU_GPCasterGroup, lp_casterUnit);
    libNtve_gf_SetDialogItemUnitGroup(libVCUI_gv_pU_GPCmdPanel, libVCUI_gv_pU_GPCasterGroup, PlayerGroupAll());
    libVCUI_gf_PU_GPVitalsUpdate();
}

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

    }
    UnitGroupAdd(libCOUI_gv_cU_GPCasterGroup[lp_player], lp_casterUnit);
    libNtve_gf_SetDialogItemUnitGroup(libCOUI_gv_cU_GPCmdPanel[lp_player], libCOUI_gv_cU_GPCasterGroup[lp_player], PlayerGroupSingle(lp_player));
    if ((TechTreeUpgradeCount(lp_player, "FenixCommander", c_techCountCompleteOnly) == 1)) {
        libNtve_gf_SetDialogItemUnit(libCOUI_gv_cU_GPCmdPanelUnitStatus[lp_player], libCOUI_gv_cU_GPUnit[lp_player], PlayerGroupSingle(lp_player));

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

            libCOUI_gf_ModifyTychusMedivacCharges(1);
        }
        libNtve_gf_SetDialogItemUnitGroup(libCOUI_gv_cU_GPCmdPanel[lp_player], libCOUI_gv_cU_GPCasterGroup[lp_player], PlayerGroupSingle(lp_player));
    }

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

    if ((PlayerCommander(lp_player) == "Zeratul")) {
        UnitGroupAdd(libCOUI_gv_cU_GPCasterGroupSecondary[lp_player], libCOMI_gv_cM_GlobalCasterUnitSecondary[lp_player]);
        libNtve_gf_SetDialogItemUnitGroup(libCOUI_gv_cU_ZeratulSelectionCmdPanel, libCOUI_gv_cU_GPCasterGroupSecondary[lp_player], PlayerGroupSingle(lp_player));
    }

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


    UnitGroupAdd(libCOMI_gv_cM_GlobalCasterUnitGroup[libCOOC_gf_CC_PlayerOfCommanderInGroupFirst("TerranTychus", libCOOC_gf_CommanderPlayers())], lv_medivacplatform);
    libNtve_gf_SetDialogItemUnitGroup(libCOUI_gv_cU_GPCmdPanel[libCOOC_gf_CC_PlayerOfCommanderInGroupFirst("TerranTychus", libCOOC_gf_CommanderPlayers())], libCOMI_gv_cM_GlobalCasterUnitGroup[libCOOC_gf_CC_PlayerOfCommanderInGroupFirst("TerranTychus", libCOOC_gf_CommanderPlayers())], PlayerGroupAll());
    return true;
}

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:1274


    // Implementation
    libNtve_gf_SetDialogItemUnitGroup(libWCdr_gv_gameUI.lv_hero_CommandPanel, lv_herogroup, lv_playergroup);
    libNtve_gf_SetDialogItemUnitGroup(libWCdr_gv_gameUI.lv_hero_InventoryPanel, lv_herogroup, lv_playergroup);
    libWCdr_gf_UpdateHeroLevelLabel(lp_hero);

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:1275

    // Implementation
    libNtve_gf_SetDialogItemUnitGroup(libWCdr_gv_gameUI.lv_hero_CommandPanel, lv_herogroup, lv_playergroup);
    libNtve_gf_SetDialogItemUnitGroup(libWCdr_gv_gameUI.lv_hero_InventoryPanel, lv_herogroup, lv_playergroup);
    libWCdr_gf_UpdateHeroLevelLabel(lp_hero);
}