# Set Portrait Channel
Grammar — Set Portrait channel to channel
Flags —Native
|Action
Sets the render-to-texture channel for the specified portrait, which determines where the portrait textures can appear in the game.
# Arguments
int
<portrait> — Portraitint
— Channel
Returns — void
native void PortraitSetChannel(int p, int channel);
# 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/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:13375
PortraitSetOffscreen(PortraitLastCreated(), true);
if ((lp_attachToScreenNow == true)) {
PortraitSetChannel(PortraitLastCreated(), lv_channel);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:26477
}
PortraitSetChannel(gv_bridgeCommunicatorPortraitValerian, 4);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_ActorUnit(ge_ActorID_ActorRaynor)), c_animNameDefault, "Hover End", c_animFlagNonLooping, c_animTimeDefault);
Wait(1.2, c_timeReal);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:26504
}
PortraitSetChannel(gv_bridgeCommunicatorPortraitValerian, 1);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_ActorUnit(ge_ActorID_ActorRaynor)), c_animNameDefault, "Hover End", c_animFlagNonLooping, c_animTimeDefault);
Wait(2.0, c_timeReal);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:26513
else if (autoF4007082_val == "ValerianRaynor00009") {
gf_ClearAnimationwithblendtime(c_animNameDefault, gf_ActorUnit(ge_ActorID_ActorRaynor), 0.0);
PortraitSetChannel(gv_bridgeCommunicatorPortraitValerian, 1);
}
else {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:26541
PortraitWaitForLoad(gv_bridgeCommunicatorPortraitValerian);
PortraitSetVisible(gv_bridgeCommunicatorPortraitValerian, PlayerGroupAll(), true, true);
PortraitSetChannel(gv_bridgeCommunicatorPortraitValerian, 1);
gf_Convo("Valerian", ge_RoomID_RoomBridge, ge_ActorID_ActorRaynor, PointFromId(36), ge_ActorID_ActorValerian, null, null, ge_ActorID_ActorNone, null, null, gt_BridgeCommunicatorClickedPreCallback, gt_BridgeCommunicatorClickedPostCallback, true, true, null, gt_BridgeCommunicatorClickedCustomCamera);
gf_TurnClickablesOnOff(gv_clickables, true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:29113
SoundPlay(SoundLink("Hanson01BriefingAlarm", 0), PlayerGroupAll(), 100.0, 0.0);
gv_briefingSoundPlayed = SoundLastPlayed();
PortraitSetChannel(lv_portaitMiddle, 1);
Wait(0.6, c_timeGame);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromModel(libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactHanson)), lv_portaitMiddle, SoundLink("THanson01BriefingHanson00001", 0), 0.0, c_transmissionDurationAdd, true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:30005
gf_RemoveVisibleUnit(true, gf_BriefingScreen(lv__Room, ge_BriefingScreen_Center));
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_BriefingScreen(lv__Room, ge_BriefingScreen_Center)), c_animNameDefault, "Birth", c_animFlagPlayForever | c_animFlagNonLooping, 0.0);
PortraitSetChannel(lv_portaitMiddleHan, 1);
TriggerExecute(gt_BriefingTHorner02HanText, true, false);
Wait(0.6, c_timeGame);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:30021
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_BriefingScreen(lv__Room, ge_BriefingScreen_Left)), c_animNameDefault, "Birth", c_animFlagPlayForever | c_animFlagNonLooping, 0.0);
libNtve_gf_SetAnimationCompletion(libNtve_gf_MainActorofUnit(gf_BriefingScreen(lv__Room, ge_BriefingScreen_Left)), c_animNameDefault, 100.0);
PortraitSetChannel(lv_portaitLeft1, 2);
gf_RemoveVisibleUnit(true, gf_BriefingScreen(lv__Room, ge_BriefingScreen_Left));
PortraitDestroy(lv_portaitMiddleHan);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:30989
CameraApplyInfo(1, CameraInfoFromId(450), 0.0, -1, 10, true);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromUnit(gf_ActorUnit(ge_ActorID_ActorRaynor), false, false, "Talk"), c_invalidPortraitId, SoundLink("TTosh02BriefingRaynor00002", 0), 0.0, c_transmissionDurationAdd, true);
PortraitSetChannel(lv_portaitMiddle, 1);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gv_bridgeCommunicator), c_animNameDefault, "Birth", c_animFlagPlayForever | c_animFlagNonLooping, 0.0);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromUnit(gf_ActorUnit(ge_ActorID_ActorRaynor), false, false, "Talk"), c_invalidPortraitId, SoundLink("TTosh02BriefingRaynor00005", 0), 0.0, c_transmissionDurationAdd, false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:32885
TransmissionWait(TransmissionLastSent(), 1.0);
libNtve_gf_StopAllVideoTexturesOnUnit(gf_BriefingScreen(lv__Room, ge_BriefingScreen_Main));
PortraitSetChannel(lv_portaitMiddle, 1);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromModel(libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactKerrigan)), lv_portaitMiddle, SoundLink("TValerian01BriefingKerrigan00004", 0), 0.0, c_transmissionDurationAdd, false);
Wait(1.0, c_timeReal);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:13375
PortraitSetOffscreen(PortraitLastCreated(), true);
if ((lp_attachToScreenNow == true)) {
PortraitSetChannel(PortraitLastCreated(), lv_channel);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:26477
}
PortraitSetChannel(gv_bridgeCommunicatorPortraitValerian, 4);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_ActorUnit(ge_ActorID_ActorRaynor)), c_animNameDefault, "Hover End", c_animFlagNonLooping, c_animTimeDefault);
Wait(1.2, c_timeReal);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:26504
}
PortraitSetChannel(gv_bridgeCommunicatorPortraitValerian, 1);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_ActorUnit(ge_ActorID_ActorRaynor)), c_animNameDefault, "Hover End", c_animFlagNonLooping, c_animTimeDefault);
Wait(2.0, c_timeReal);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:26513
else if (autoF4007082_val == "ValerianRaynor00009") {
gf_ClearAnimationwithblendtime(c_animNameDefault, gf_ActorUnit(ge_ActorID_ActorRaynor), 0.0);
PortraitSetChannel(gv_bridgeCommunicatorPortraitValerian, 1);
}
else {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:26541
PortraitWaitForLoad(gv_bridgeCommunicatorPortraitValerian);
PortraitSetVisible(gv_bridgeCommunicatorPortraitValerian, PlayerGroupAll(), true, true);
PortraitSetChannel(gv_bridgeCommunicatorPortraitValerian, 1);
gf_Convo("Valerian", ge_RoomID_RoomBridge, ge_ActorID_ActorRaynor, PointFromId(36), ge_ActorID_ActorValerian, null, null, ge_ActorID_ActorNone, null, null, gt_BridgeCommunicatorClickedPreCallback, gt_BridgeCommunicatorClickedPostCallback, true, true, null, gt_BridgeCommunicatorClickedCustomCamera);
gf_TurnClickablesOnOff(gv_clickables, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:29113
SoundPlay(SoundLink("Hanson01BriefingAlarm", 0), PlayerGroupAll(), 100.0, 0.0);
gv_briefingSoundPlayed = SoundLastPlayed();
PortraitSetChannel(lv_portaitMiddle, 1);
Wait(0.6, c_timeGame);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromModel(libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactHanson)), lv_portaitMiddle, SoundLink("THanson01BriefingHanson00001", 0), 0.0, c_transmissionDurationAdd, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:30005
gf_RemoveVisibleUnit(true, gf_BriefingScreen(lv__Room, ge_BriefingScreen_Center));
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_BriefingScreen(lv__Room, ge_BriefingScreen_Center)), c_animNameDefault, "Birth", c_animFlagPlayForever | c_animFlagNonLooping, 0.0);
PortraitSetChannel(lv_portaitMiddleHan, 1);
TriggerExecute(gt_BriefingTHorner02HanText, true, false);
Wait(0.6, c_timeGame);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:30021
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_BriefingScreen(lv__Room, ge_BriefingScreen_Left)), c_animNameDefault, "Birth", c_animFlagPlayForever | c_animFlagNonLooping, 0.0);
libNtve_gf_SetAnimationCompletion(libNtve_gf_MainActorofUnit(gf_BriefingScreen(lv__Room, ge_BriefingScreen_Left)), c_animNameDefault, 100.0);
PortraitSetChannel(lv_portaitLeft1, 2);
gf_RemoveVisibleUnit(true, gf_BriefingScreen(lv__Room, ge_BriefingScreen_Left));
PortraitDestroy(lv_portaitMiddleHan);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:30989
CameraApplyInfo(1, CameraInfoFromId(450), 0.0, -1, 10, true);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromUnit(gf_ActorUnit(ge_ActorID_ActorRaynor), false, false, "Talk"), c_invalidPortraitId, SoundLink("TTosh02BriefingRaynor00002", 0), 0.0, c_transmissionDurationAdd, true);
PortraitSetChannel(lv_portaitMiddle, 1);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gv_bridgeCommunicator), c_animNameDefault, "Birth", c_animFlagPlayForever | c_animFlagNonLooping, 0.0);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromUnit(gf_ActorUnit(ge_ActorID_ActorRaynor), false, false, "Talk"), c_invalidPortraitId, SoundLink("TTosh02BriefingRaynor00005", 0), 0.0, c_transmissionDurationAdd, false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:32885
TransmissionWait(TransmissionLastSent(), 1.0);
libNtve_gf_StopAllVideoTexturesOnUnit(gf_BriefingScreen(lv__Room, ge_BriefingScreen_Main));
PortraitSetChannel(lv_portaitMiddle, 1);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromModel(libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactKerrigan)), lv_portaitMiddle, SoundLink("TValerian01BriefingKerrigan00004", 0), 0.0, c_transmissionDurationAdd, false);
Wait(1.0, c_timeReal);