# Set Mercenary Portrait Image

Grammar — Set the portrait image of mercenaryId to file
FlagsNative | Action

Sets the portrait image for the specified mercenary.

# Arguments

  • int<preset::Mercenary> — MercenaryId
  • string<filepath> — File

Returns — void

native void MercenarySetImageFilePath(
	int inMercenaryId,
	string inFilePath,
);

Category: Story / Mercenary Panel

# Examples

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

    while (auto6EC12EBE_i <= libCamp_gv_TSC_MERC_LAST) {
        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)) {

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

            MercenarySetState(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], c_mercenaryStateEnabled);
            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:3781

            MercenarySetState(libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)], c_mercenaryStateNew);
            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:3791

        else if ((libCamp_gf_MercStatusCheck(lv_indexMerc, libCamp_ge_StoryMercStatus_Purchased) == true)) {
            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");
        }

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

    libCamp_gf_TS_AddRecentMerc(lv_mercBought);
    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;

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

        lv_indexMerc = libCamp_gv_tS_MercID[autoA5A32113_i];
        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");
        }