# Set Mercenary Portrait Model

Grammar — Set the model of mercenaryId to model
FlagsNative | Action

Sets the portrait model for the specified mercenary.

# Arguments

  • int<preset::Mercenary> — MercenaryId
  • string<gamelink::Model> — Model

Returns — void

native void MercenarySetModelLink(
	int inMercenaryId,
	string inModelLink,
);

Category: Story / Mercenary Panel

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:3747

            MercenarySetUnitText(MercenaryLastCreated(), libCamp_gf_MercUnitText(lv_indexMerc));
            MercenarySetSpecialText(MercenaryLastCreated(), libCamp_gf_MercSpecialText(lv_indexMerc));
            MercenarySetModelLink(MercenaryLastCreated(), libCamp_gf_MercPortraitModel(lv_indexMerc));
            MercenarySetScenePath(MercenaryLastCreated(), libCamp_gf_MercVideo(lv_indexMerc));
            auto90A2DADE_val = lv_indexMerc;

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:3769

        lv_indexMerc = libCamp_gv_tS_MercID[auto6EC12EBE_i];
        MercenarySetImageFilePath(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], null);
        MercenarySetModelLink(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], libCamp_gf_MercPortraitModel(lv_indexMerc));
        if ((libCamp_gf_MercStatusCheck(lv_indexMerc, libCamp_ge_StoryMercStatus_Available) == true)) {
            MercenarySetState(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], c_mercenaryStateEnabled);

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:3774

            if ((libCamp_gf_MercCost(lv_indexMerc) > libCamp_gf_StoryCredits())) {
                MercenarySetImageFilePath(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], libCamp_gv_tS_MercNoCreditImage[(lv_indexMerc)]);
                MercenarySetModelLink(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], "Invisible");
            }

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:3782

            if ((libCamp_gf_MercCost(lv_indexMerc) > libCamp_gf_StoryCredits())) {
                MercenarySetImageFilePath(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], libCamp_gv_tS_MercNoCreditImage[(lv_indexMerc)]);
                MercenarySetModelLink(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], "Invisible");
            }

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:3792

            MercenarySetState(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], c_mercenaryStatePurchased);
            MercenarySetImageFilePath(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], libCamp_gv_tS_MercHiredImage[(lv_indexMerc)]);
            MercenarySetModelLink(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], "Invisible");
        }
        auto6EC12EBE_i = auto6EC12EBE_i + 1;

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:12214

    MercenaryPurchase(libCamp_gv_tS_MercUIMercenaries[(lv_mercBought)]);
    MercenarySetImageFilePath(libCamp_gv_tS_MercUIMercenaries[(lv_mercBought)], libCamp_gv_tS_MercHiredImage[(lv_mercBought)]);
    MercenarySetModelLink(libCamp_gv_tS_MercUIMercenaries[(lv_mercBought)], "Invisible");
    autoA5A32113_i = libCamp_gv_TSC_MERC_FIRST;
    while (autoA5A32113_i <= libCamp_gv_TSC_MERC_LAST) {

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:12220

        if ((libCamp_gf_MercCost(lv_indexMerc) > libCamp_gf_StoryCredits()) && ((libCamp_gf_MercStatusCheck(lv_indexMerc, libCamp_ge_StoryMercStatus_Available) == true) || (libCamp_gf_MercStatusCheck(lv_indexMerc, libCamp_ge_StoryMercStatus_New) == true))) {
            MercenarySetImageFilePath(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], libCamp_gv_tS_MercNoCreditImage[(lv_indexMerc)]);
            MercenarySetModelLink(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], "Invisible");
        }