# Set Portrait Model
Grammar — Set Portrait model to Model (wait until loaded)
Flags —Native
|Action
Sets the model for a portrait.
# Arguments
int
[ portrait ] — Portraitstring
[ gamelink::Model ] — Modelbool
[ preset::Trigger_Wait_Option ] — Wait For Load
Returns — void
native void PortraitSetModel(
int p,
string modelLink,
bool waitUntilLoaded,
);
# Related
Category: Portrait / Advanced
- [F] —
void
— Destroy All Portraits — ( PortraitDestroyAll ) - [F] —
void
— Destroy Portrait — ( PortraitDestroy ) - [F] —
void
— Play Portrait Animation — ( libNtve_gf_PortraitSetAnim ) - [F] —
void
— Set Portrait Camera — ( PortraitSetCamera ) - [F] —
void
— Set Portrait Border Texture — ( PortraitSetBorderTexture ) - [F] —
void
— Set Portrait Light — ( PortraitSetLight ) - [F] —
void
— Set Portrait Model — ( PortraitSetModel ) - [F] —
void
— Set Portrait Model And Play Animation — ( PortraitSetModelAnim ) - [F] —
void
— Set Portrait Position — ( PortraitSetPosition ) - [F] —
void
— Set Portrait Size — ( PortraitSetSize ) - [F] —
void
— Set Portrait Transition Model — ( PortraitSetTransitionModel ) - [F] —
void
— Set Portrait Mouse Target — ( PortraitSetMouseTarget ) - [F] —
void
— Set Portrait Channel — ( PortraitSetChannel ) - [F] —
void
— Set Portrait Render Type — ( PortraitSetRenderType ) - [F] —
void
— Mute/Unmute Portrait — ( PortraitSetMuted ) - [F] —
void
— Pause/Unpause Portrait — ( PortraitSetPaused ) - [F] —
void
— Set Portrait Tint Color — ( PortraitSetTintColor ) - [F] —
void
— Set Portrait Team Color — ( PortraitSetTeamColor ) - [F] —
void
— Set Portrait Actor — ( PortraitSetActor ) - [F] —
void
— Turn Portrait Border On/Off — ( PortraitSetBorderVisible ) - [F] —
void
— Turn Portrait Background On/Off — ( PortraitSetBackgroundVisible ) - [F] —
void
— Turn Portrait Fullscreen On/Off — ( PortraitSetFullscreen ) - [F] —
void
— Turn Portrait Offscreen On/Off — ( PortraitSetOffscreen ) - [F] —
void
— Turn Portrait Transition On/Off — ( PortraitUseTransition ) - [F] —
void
— Force Portrait Transition On/Off — ( PortraitForceTransition ) - [F] —
void
— Clear Portrait Animation — ( libNtve_gf_ClearPortraitAnimation ) - [F] —
void
— Wait For Portrait To Load — ( PortraitWaitForLoad )
# Examples
# campaigns/liberty.sc2campaign
// 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
// 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
// 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
// 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
// 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
// L10852
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L10863
PortraitSetModel(lp_portrait, "StaticPortrait", false)
# mods/starcoop/starcoop.sc2mod
// 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
// L696
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L708
PortraitSetModel(lp_portrait, "StaticPortrait", false)
// L1196
PortraitSetModel(libA3DDD02B_gv_pP_PlanetPortrait, lp_model, true)