# Set Portrait Actor
Grammar — Set Portrait Actor to actor
Flags —Native
|Action
Set the actor of the specified portrait.
# Arguments
int
<portrait> — Portraitstring
<gamelink::Actor> — Actor
Returns — void
native void PortraitSetActor(int p, string actorLink);
# Related
Category: Portrait / Advanced
- Destroy All Portraits —
void
— PortraitDestroyAll - Destroy Portrait —
void
— PortraitDestroy - Play Portrait Animation —
void
— libNtve_gf_PortraitSetAnim - Set Portrait Camera —
void
— PortraitSetCamera - Set Portrait Border Texture —
void
— PortraitSetBorderTexture - Set Portrait Light —
void
— PortraitSetLight - Set Portrait Model —
void
— PortraitSetModel - Set Portrait Model And Play Animation —
void
— PortraitSetModelAnim - Set Portrait Position —
void
— PortraitSetPosition - Set Portrait Size —
void
— PortraitSetSize - Set Portrait Transition Model —
void
— PortraitSetTransitionModel - Set Portrait Mouse Target —
void
— PortraitSetMouseTarget - Set Portrait Channel —
void
— PortraitSetChannel - Set Portrait Render Type —
void
— PortraitSetRenderType - Mute/Unmute Portrait —
void
— PortraitSetMuted - Pause/Unpause Portrait —
void
— PortraitSetPaused - Set Portrait Tint Color —
void
— PortraitSetTintColor - Set Portrait Team Color —
void
— PortraitSetTeamColor - Set Portrait Actor —
void
— PortraitSetActor - Turn Portrait Border On/Off —
void
— PortraitSetBorderVisible - Turn Portrait Background On/Off —
void
— PortraitSetBackgroundVisible - Turn Portrait Fullscreen On/Off —
void
— PortraitSetFullscreen - Turn Portrait Offscreen On/Off —
void
— PortraitSetOffscreen - Turn Portrait Transition On/Off —
void
— PortraitUseTransition - Force Portrait Transition On/Off —
void
— PortraitForceTransition - Clear Portrait Animation —
void
— libNtve_gf_ClearPortraitAnimation - Wait For Portrait To Load —
void
— PortraitWaitForLoad
# Examples
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:8528
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.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:9499
}
PortraitSetModel(PortraitGetTriggerControl(libSwaC_gv_zS_ArmyCustomMissionContactPortrait), "EvolutionMasterPortrait3D", true);
PortraitSetActor(PortraitGetTriggerControl(libSwaC_gv_zS_ArmyCustomMissionContactPortrait), "EvolutionMasterPortrait3D");
DialogControlSetVisible(libSwaC_gv_zS_ArmyCustomMissionContactPortrait, PlayerGroupAll(), true);
libNtve_gf_SetDialogItemText(libSwaC_gv_zS_ArmyCustomMissionTitleLabel, StringExternal(CatalogFieldValueGet(c_gameCatalogMap, (libSwaC_gv_zS_ArmyCustomMissionMap), "MissionText", c_playerAny)), PlayerGroupAll());
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:11604
DialogControlHookup(lp_parentControl, c_triggerControlTypePortrait, lp_frame);
libNtve_gf_SetDialogItemModel(DialogControlLastCreated(), "SMX1_KerriganAbilityConfirmationButtonEffect", PlayerGroupAll());
PortraitSetActor(PortraitGetTriggerControl(DialogControlLastCreated()), "PortraitActorWithDeath");
ActorSend(ActorFromPortrait(PortraitGetTriggerControl(DialogControlLastCreated())), "SetVisibility");
}
campaigns/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:1443
PortraitSetModel(PortraitGetTriggerControl(lib281DEC45_gv_zSS_UITravelContactPortrait), (lib281DEC45_gf_ZSS_UITravelLocationProperty(lp_planetIndex, "ContactModel")), false);
if ((lib281DEC45_gf_ZSS_UITravelLocationProperty(lp_planetIndex, "ContactActor") == "")) {
PortraitSetActor(PortraitGetTriggerControl(lib281DEC45_gv_zSS_UITravelContactPortrait), "PortraitActor");
}
else {
campaigns/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:1446
}
else {
PortraitSetActor(PortraitGetTriggerControl(lib281DEC45_gv_zSS_UITravelContactPortrait), (lib281DEC45_gf_ZSS_UITravelLocationProperty(lp_planetIndex, "ContactActor")));
}
}
campaigns/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:1560
lib281DEC45_gf_ZSS_UIMissionUpdate();
if ((lib281DEC45_gf_ZSS_UIMissionProperty("ContactActor") == "")) {
PortraitSetActor(PortraitGetTriggerControl(lib281DEC45_gv_zSS_MissionContactPortrait), "PortraitActor");
}
else {
campaigns/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:1563
}
else {
PortraitSetActor(PortraitGetTriggerControl(lib281DEC45_gv_zSS_MissionContactPortrait), (lib281DEC45_gf_ZSS_UIMissionProperty("ContactActor")));
}
if ((libSwaC_gf_StoryInSimulation() == false) && (lib281DEC45_gv_zSS_MissionPitchPlayed == false) && (lib281DEC45_gv_zSS_Preloading == false)) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:876
PortraitSetModel(PortraitGetTriggerControl(libCOUI_gv_cU_CommanderButtonPortrait[lv_commIndex]), libCOOC_gf_CC_CommanderPortraitModel(libCOUI_gv_cU_CommanderList[lv_commIndex]), false);
if ((libCOOC_gf_CC_CommanderPortraitActor(libCOUI_gv_cU_CommanderList[lv_commIndex]) != null)) {
PortraitSetActor(PortraitGetTriggerControl(libCOUI_gv_cU_CommanderButtonPortrait[lv_commIndex]), libCOOC_gf_CC_CommanderPortraitActor(libCOUI_gv_cU_CommanderList[lv_commIndex]));
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:879
}
else {
PortraitSetActor(PortraitGetTriggerControl(libCOUI_gv_cU_CommanderButtonPortrait[lv_commIndex]), "PortraitActor");
}
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:5409
PortraitSetModel(PortraitGetTriggerControl(libCOUI_gv_cU_TychusSquadPortraits[lp_squadIndex]), UserDataGetModel("CoopTechTychusSquad", lp_squadInstance, "Portrait Model", 1), false);
PortraitSetActor(PortraitGetTriggerControl(libCOUI_gv_cU_TychusSquadPortraits[lp_squadIndex]), "PortraitActor");
libNtve_gf_SetDialogItemImage(libCOUI_gv_cU_TychusSquadPortraitsStatic[lp_squadIndex], UserDataGetImagePath("CoopTechTychusSquad", lp_squadInstance, "2D Portrait", 1), PlayerGroupAll());
DialogControlSetAnimationState(libCOUI_gv_cU_TychusSquadUnitFrames[lp_squadIndex], PlayerGroupAll(), "UnitState", (lp_squadInstance));