# Set Dialog Item Model

Grammar — Set dialogItem Model to model for players
FlagsAction

Sets a Dialog Item’s Model

# Arguments

  • int<control> — Dialog Item
  • string<gamelink::Model> — Model
  • playergroup — Players

Returns — void

void libNtve_gf_SetDialogItemModel(
	int lp_dialogItem,
	string lp_model,
	playergroup lp_players,
);

Category: Dialog / Dialog Item Tools

# Examples

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

        DialogControlHookupStandard(c_triggerControlTypePortrait, "UIContainer/ConsoleUIContainer/HeroUnitFrameLevelUpPortrait");
        libSwaC_gv_zS_SwarmHeroUIDialogLevelupPortrait[lp_index] = DialogControlLastCreated();
        libNtve_gf_SetDialogItemModel(DialogControlLastCreated(), "KerriganLevelUpPortrait", PlayerGroupAll());
        DialogControlSetVisible(libSwaC_gv_zS_SwarmHeroUIDialogLevelupPortrait[1], PlayerGroupAll(), false);
    }

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

            DialogControlHookup(libSwaC_gv_zS_ArmyCustomUpgradePanel, c_triggerControlTypePortrait, "UpgradeFramePortrait" + IntToString(lv_index));
            libSwaC_gv_zS_ArmyCustomUpgradeButtons2[lv_index] = DialogControlLastCreated();
            libNtve_gf_SetDialogItemModel(DialogControlLastCreated(), "SMX1_ArmyMutationConfirmationButtonEffect", PlayerGroupAll());
            PortraitSetActor(PortraitGetTriggerControl(DialogControlLastCreated()), "PortraitActorWithDeath");
            ActorSend(ActorFromPortrait(PortraitGetTriggerControl(DialogControlLastCreated())), "SetVisibility");

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

    // Implementation
    DialogControlHookup(lp_parentControl, c_triggerControlTypePortrait, lp_frame);
    libNtve_gf_SetDialogItemModel(DialogControlLastCreated(), "SMX1_KerriganAbilityConfirmationButtonEffect", PlayerGroupAll());
    PortraitSetActor(PortraitGetTriggerControl(DialogControlLastCreated()), "PortraitActorWithDeath");
    ActorSend(ActorFromPortrait(PortraitGetTriggerControl(DialogControlLastCreated())), "SetVisibility");

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

    DialogControlHookup(lv_panel, c_triggerControlTypePortrait, "VictoryProtossPortrait");
    gv_victoryUI_Portraits[4] = DialogControlLastCreated();
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[1], "AdjutantPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[2], "DominionOfficer1Portrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[3], "QueenPortrait", PlayerGroupAll());

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

    gv_victoryUI_Portraits[4] = DialogControlLastCreated();
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[1], "AdjutantPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[2], "DominionOfficer1Portrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[3], "QueenPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[4], "ExecutorPortrait", PlayerGroupAll());

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

    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[1], "AdjutantPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[2], "DominionOfficer1Portrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[3], "QueenPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[4], "ExecutorPortrait", PlayerGroupAll());
    DialogControlHookup(lv_panel, c_triggerControlTypeImage, "VictoryZergLockedImage");

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

    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[2], "DominionOfficer1Portrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[3], "QueenPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[4], "ExecutorPortrait", PlayerGroupAll());
    DialogControlHookup(lv_panel, c_triggerControlTypeImage, "VictoryZergLockedImage");
    gv_victoryUI_LockedPortraits[3] = DialogControlLastCreated();

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

    DialogControlHookup(lv_panel, c_triggerControlTypePortrait, "VictoryProtossPortrait");
    gv_victoryUI_Portraits[4] = DialogControlLastCreated();
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[1], "AdjutantPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[2], "DominionOfficer1Portrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[3], "QueenPortrait", PlayerGroupAll());

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

    gv_victoryUI_Portraits[4] = DialogControlLastCreated();
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[1], "AdjutantPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[2], "DominionOfficer1Portrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[3], "QueenPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[4], "ExecutorPortrait", PlayerGroupAll());

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

    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[1], "AdjutantPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[2], "DominionOfficer1Portrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[3], "QueenPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[4], "ExecutorPortrait", PlayerGroupAll());
    DialogControlHookup(lv_panel, c_triggerControlTypeImage, "VictoryZergLockedImage");

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

    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[2], "DominionOfficer1Portrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[3], "QueenPortrait", PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(gv_victoryUI_Portraits[4], "ExecutorPortrait", PlayerGroupAll());
    DialogControlHookup(lv_panel, c_triggerControlTypeImage, "VictoryZergLockedImage");
    gv_victoryUI_LockedPortraits[3] = DialogControlLastCreated();

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

        DialogControlHookup(libVCUI_gv_pU_ArmyFactionPanel, c_triggerControlTypePortrait, "FactionButtonPortrait" + IntToString(lv_factionIndex));
        libVCUI_gv_pU_ArmyFactionPortrait[lv_factionIndex] = DialogControlLastCreated();
        libNtve_gf_SetDialogItemModel(DialogControlLastCreated(), "UI_ArmyRoom_FactionButton", PlayerGroupAll());
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        DialogControlHookup(libVCUI_gv_pU_ArmyFactionButtons[lv_factionIndex], c_triggerControlTypeLabel, "UnitTitle");

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

            libNtve_gf_SetDialogItemToggled(libVCUI_gv_pU_ArmyFactionButtons[lv_factionIndex], true, PlayerGroupAll());
            DialogControlSendAnimationEvent(libVCUI_gv_pU_ArmyFactionButtons[lv_factionIndex], PlayerGroupAll(), "Selected");
            libNtve_gf_SetDialogItemModel(libVCUI_gv_pU_ArmyFactionPortrait[lv_factionIndex], libVCUI_gf_PU_ArmyFactionGlowModel(libVoiC_gf_PC_ArmyUnitFaction(libVCUI_gv_pU_ArmyUnits[libVCUI_gv_pU_ArmyCategorySelectedIndex][lv_factionIndex])), PlayerGroupAll());
            DialogControlSetVisible(libVCUI_gv_pU_ArmyFactionPortrait[lv_factionIndex], PlayerGroupAll(), true);
        }

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

    }
    libVCUI_gv_pU_MissionNextMap = lp_mission;
    libNtve_gf_SetDialogItemModel(libVCUI_gv_pU_MissionPortraitFrame, libVoiC_gf_PC_CampaignMapContactPortrait(lp_mission), PlayerGroupAll());
    if ((libVoiC_gf_PC_CampaignMapContactActor(lp_mission) == null)) {
        libNtve_gf_SetDialogItemActor(libVCUI_gv_pU_MissionPortraitFrame, "PortraitActor", PlayerGroupAll());

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

    DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePortrait, "LotV_GameUI/SoAOverlayTemplate");
    PortraitUseTransition(PortraitGetTriggerControl(DialogControlLastCreated()), false);
    libNtve_gf_SetDialogItemModel(DialogControlLastCreated(), "SOA_Calldown_UI", PlayerGroupAll());
    libVCUI_gv_pU_TargetingOverlayPortrait = DialogControlLastCreated();
}

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


    if ((libVCUI_gv_pU_MissionAiur05UIPortraitChanged == false)) {
        libNtve_gf_SetDialogItemModel(libVCUI_gv_pU_MissionPortraitFrame, "AmonDarkEx2Portrait", PlayerGroupAll());
        libVCUI_gv_pU_MissionAiur05UIPortraitChanged = true;
    }

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

    }
    else {
        libNtve_gf_SetDialogItemModel(libVCUI_gv_pU_MissionPortraitFrame, "RohanaEx2PortraitNoBraids3D", PlayerGroupAll());
        libVCUI_gv_pU_MissionAiur05UIPortraitChanged = false;
    }

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

        DialogControlHookup(libVCUI_gv_pU_GPCmdPanel, c_triggerControlTypeButton, "CommandButton0" + IntToString(lv_buttonIndex-1));
        libVCUI_gv_pU_GPCmdButtons[lv_buttonIndex] = DialogControlLastCreated();
        libNtve_gf_SetDialogItemModel(DialogControlLastCreated(), "UI_SOA_ButtonActivate", PlayerGroupAll());
        DialogControlHookup(libVCUI_gv_pU_GPPanel, c_triggerControlTypePanel, "SoAAbilityArrow0" + IntToString(lv_buttonIndex));
        libVCUI_gv_pU_GPAbilityArrows[lv_buttonIndex] = DialogControlLastCreated();

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

    libNCUI_gv_NU_MissionNextMap = lp_mission;
    libNtve_gf_SetDialogItemText(libNCUI_gv_nU_MissionPortraitTitle, libComC_gf_CC_MapContactName(lp_mission), PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(libNCUI_gv_nU_MissionPortrait, libComC_gf_CC_MapContactPortrait(lp_mission), PlayerGroupAll());
    if ((libComC_gf_CC_MapContactActor(lp_mission) == null)) {
        libNtve_gf_SetDialogItemActor(libNCUI_gv_nU_MissionPortrait, "PortraitActor", PlayerGroupAll());

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

    libNCUI_gf_NU_MissionEnableDisableUpgradesButton(true);
    libNtve_gf_SetDialogItemMovie(libNCUI_gv_nU_MissionBriefingMovieFrame, (""), PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(libNCUI_gv_nU_MissionPortrait, libComC_gf_CC_MapContactPortrait(libNCUI_gf_NU_NextAvailableMission()), PlayerGroupAll());
    if ((libComC_gf_CC_MapContactActor(libNCUI_gf_NU_NextAvailableMission()) == null)) {
        libNtve_gf_SetDialogItemActor(libNCUI_gv_nU_MissionPortrait, "PortraitActor", PlayerGroupAll());

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

        DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePortrait, "LotV_GameUI/SoAOverlayTemplate");
        PortraitUseTransition(PortraitGetTriggerControl(DialogControlLastCreated()), false);
        libNtve_gf_SetDialogItemModel(DialogControlLastCreated(), "SOA_Calldown_UI", PlayerGroupAll());
        libCOUI_gv_cU_TargetingOverlayPortrait[lp_player] = DialogControlLastCreated();
    }

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

    libNtve_gf_SetDialogItemText(libA3DDD02B_gv_pP_MLTitle, StringExternal(libA3DDD02B_gf_PP_MissionProperty("Name")), PlayerGroupAll());
    libNtve_gf_SetDialogItemText(libA3DDD02B_gv_pP_MLObjective, StringExternal(libA3DDD02B_gf_PP_MissionProperty("PrimaryObjectiveText")), PlayerGroupAll());
    libNtve_gf_SetDialogItemModel(libA3DDD02B_gv_pP_MLContactPortrait, (CatalogFieldValueGet(c_gameCatalogMap, libA3DDD02B_gv_pP_NextMission, "ContactModelLink", c_playerAny)), PlayerGroupAll());
    libNtve_gf_SetDialogItemLight(libA3DDD02B_gv_pP_MLContactPortrait, "SelendisPortrait", PlayerGroupAll());
    lv_indexAchievement = 1;

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


    // Implementation
    libNtve_gf_SetDialogItemModel(libWCdr_gv_gameUI.lv_hero_Portrait, UserDataGetModel("PlayableLegends", libWCdr_gv_legends.lv_player[lp_player].lv_selectedLegend, "HeroPortraitModel", 1), lv_playergroup);
}