# Set Portrait Model

Grammar — Set Portrait model to Model (wait until loaded)
FlagsNative | Action

Sets the model for a portrait.

# Arguments

  • int [ portrait ] — Portrait
  • string [ gamelink::Model ] — Model
  • bool [ preset::Trigger_Wait_Option ] — Wait For Load

Returns — void

native void PortraitSetModel(
	int p,
	string modelLink,
	bool waitUntilLoaded,
);

Category: Portrait / Advanced

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L10524
PortraitSetModel(gv_zPlanetPanel_PortraitPlanet, libCamp_gf_PlanetModel(libCamp_gf_MissionPlanet(gv_zPlanetPanel_Mission)), true)
// L25064
PortraitSetModel(PortraitGetPlanetPanel(), "HansonDistressPortrait", true)
// L25067
PortraitSetModel(PortraitGetPlanetPanel(), libCamp_gf_ContactPortraitModel(libCamp_gf_MissionContact(libCamp_gf_PlanetMission(gv_planetPanel_CurrentSelection))), true)
// L31147
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactTosh), true)
// L34094
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactNova), true)
// L34099
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactTosh), true)
// L34102
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactNova), true)
// L34105
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactNova), true)
// L34108
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactTosh), true)
// L34109
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactTosh), true)
// L666
PortraitSetModel(libNtve_gf_CinematicPortrait(4), "AdjutantPortrait_L", false)
// L1206
PortraitSetModel(gv_cinematicWindow, "AdjutantPortrait_L", false)
// L1274
PortraitSetModel(gv_cinematicWindow, "AdjutantPortrait_L", false)
// L1427
PortraitSetModel(gv_cinematicWindow, "AdjutantPortrait_L", false)
// L10524
PortraitSetModel(gv_zPlanetPanel_PortraitPlanet, libCamp_gf_PlanetModel(libCamp_gf_MissionPlanet(gv_zPlanetPanel_Mission)), true)
// L25064
PortraitSetModel(PortraitGetPlanetPanel(), "HansonDistressPortrait", true)
// L25067
PortraitSetModel(PortraitGetPlanetPanel(), libCamp_gf_ContactPortraitModel(libCamp_gf_MissionContact(libCamp_gf_PlanetMission(gv_planetPanel_CurrentSelection))), true)
// L31147
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactTosh), true)
// L34094
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactNova), true)
// L34099
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactTosh), true)
// L34102
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactNova), true)
// L34105
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactNova), true)
// L34108
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactTosh), true)
// L34109
PortraitSetModel(libNtve_gf_FullscreenPortrait(), libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactTosh), true)
// L666
PortraitSetModel(libNtve_gf_CinematicPortrait(4), "AdjutantPortrait_L", false)
// L1206
PortraitSetModel(gv_cinematicWindow, "AdjutantPortrait_L", false)
// L1274
PortraitSetModel(gv_cinematicWindow, "AdjutantPortrait_L", false)
// L1427
PortraitSetModel(gv_cinematicWindow, "AdjutantPortrait_L", false)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L1008
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L1020
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L1510
PortraitSetModel(libSwaC_gv_zS_PlanetPortrait, lp_model, true)
// L7417
PortraitSetModel(PortraitGetTriggerControl(libSwaC_gv_zS_ArmyCustomEggRoomEvolutionButtonHighlight), "EvolutionButtonHighlight", true)
// L9498
PortraitSetModel(PortraitGetTriggerControl(libSwaC_gv_zS_ArmyCustomMissionContactPortrait), "EvolutionMasterPortrait3D", true)

# campaigns/swarmstoryutil.sc2mod

Lib281DEC45.galaxy

// L1147
PortraitSetModel(PortraitGetTriggerControl(lib281DEC45_gv_zSS_UITravelPlanetPortrait[lv_index]), (lib281DEC45_gf_ZSS_UITravelLocationProperty(IntLoopCurrent(), "PlanetModel")), true)
// L1438
PortraitSetModel(PortraitGetTriggerControl(lib281DEC45_gv_zSS_UITravelContactPortrait), "AdjutantPortrait_L3D", false)
// L1441
PortraitSetModel(PortraitGetTriggerControl(lib281DEC45_gv_zSS_UITravelContactPortrait), (lib281DEC45_gf_ZSS_UITravelLocationProperty(lp_planetIndex, "ContactModel")), false)
// L1455
PortraitSetModel(PortraitGetTriggerControl(lib281DEC45_gv_zSS_UITravelBGPortrait), (lib281DEC45_gf_ZSS_UITravelLocationProperty(lp_planetIndex, "BackgroundModel")), false)
// L1685
PortraitSetModel(PortraitGetTriggerControl(lib281DEC45_gv_zSS_MissionContactPortrait), (lib281DEC45_gf_ZSS_UIMissionProperty("ContactModelLink")), true)

# campaigns/voidstory.sc2campaign

VoidCampaignMissionLib.galaxy

// L2016
PortraitSetModel(libVCMI_gv_pM_PlanetPortrait, lp_model, true)
// L2929
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L2948
PortraitSetModel(lp_portrait, "StaticPortrait", false)

# mods/heroesdata.stormmod

HeroesLib.galaxy

// L3711
PortraitSetModel(lp_portrait, "MissingPortrait", false)
// L3722
PortraitSetModel(lp_portrait, "MissingPortrait", false)
// L3915
PortraitSetModel(lp_portrait, "MissingPortrait", false)
// L3926
PortraitSetModel(lp_portrait, "MissingPortrait", false)

# mods/missionpacks/novacampaign.sc2mod

LibNCMI.galaxy

// L2696
PortraitSetModel(libNCMI_gv_NM_PlanetPortrait, lp_model, true)
// L3142
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L3161
PortraitSetModel(lp_portrait, "StaticPortrait", false)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L10819
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L10830
PortraitSetModel(lp_portrait, "StaticPortrait", false)

# mods/starcoop/starcoop.sc2mod

LibCOUI.galaxy

// L874
PortraitSetModel(PortraitGetTriggerControl(libCOUI_gv_cU_CommanderButtonPortrait[lv_commIndex]), libCOOC_gf_CC_CommanderPortraitModel(libCOUI_gv_cU_CommanderList[lv_commIndex]), false)
// L5408
PortraitSetModel(PortraitGetTriggerControl(libCOUI_gv_cU_TychusSquadPortraits[lp_squadIndex]), UserDataGetModel("CoopTechTychusSquad", lp_squadInstance, "Portrait Model", 1), false)

# mods/voidprologue.sc2mod

LibA3DDD02B.galaxy

// L696
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L708
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L1196
PortraitSetModel(libA3DDD02B_gv_pP_PlanetPortrait, lp_model, true)