# Turn Portrait Offscreen On/Off
Grammar — Turn Portrait offscreen Fullscreen
Flags —Native
|Action
Sets whether or not the specified portrait is rendered offscreen.
# Arguments
int
<portrait> — Portraitbool
<preset::OnOffOption> — On/Off
Returns — void
native void PortraitSetOffscreen(int p, bool isOffscreen);
# 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:13373
lv_cameraString = lp_camera;
PortraitCreate(0, 0, c_anchorCenter, lv_width, lv_height, lp_model, lv_cameraString, "Default", true, false);
PortraitSetOffscreen(PortraitLastCreated(), true);
if ((lp_attachToScreenNow == true)) {
PortraitSetChannel(PortraitLastCreated(), lv_channel);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:26538
PortraitCreate(0, 0, c_anchorCenter, 720, 406, "ValerianPortrait", "", "", false, false);
gv_bridgeCommunicatorPortraitValerian = PortraitLastCreated();
PortraitSetOffscreen(gv_bridgeCommunicatorPortraitValerian, true);
PortraitWaitForLoad(gv_bridgeCommunicatorPortraitValerian);
PortraitSetVisible(gv_bridgeCommunicatorPortraitValerian, PlayerGroupAll(), true, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:13373
lv_cameraString = lp_camera;
PortraitCreate(0, 0, c_anchorCenter, lv_width, lv_height, lp_model, lv_cameraString, "Default", true, false);
PortraitSetOffscreen(PortraitLastCreated(), true);
if ((lp_attachToScreenNow == true)) {
PortraitSetChannel(PortraitLastCreated(), lv_channel);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:26538
PortraitCreate(0, 0, c_anchorCenter, 720, 406, "ValerianPortrait", "", "", false, false);
gv_bridgeCommunicatorPortraitValerian = PortraitLastCreated();
PortraitSetOffscreen(gv_bridgeCommunicatorPortraitValerian, true);
PortraitWaitForLoad(gv_bridgeCommunicatorPortraitValerian);
PortraitSetVisible(gv_bridgeCommunicatorPortraitValerian, PlayerGroupAll(), true, true);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:1503
PortraitCreate(0, 0, c_anchorTopLeft, 50, 50, lp_model, "", "Default", false, false);
libSwaC_gv_zS_PlanetPortrait = PortraitLastCreated();
PortraitSetOffscreen(libSwaC_gv_zS_PlanetPortrait, true);
PortraitSetBackgroundVisible(libSwaC_gv_zS_PlanetPortrait, false);
PortraitSetBorderVisible(libSwaC_gv_zS_PlanetPortrait, false);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:1565
PortraitSetPosition(libSwaC_gv_zS_PlanetPortrait, c_anchorTopLeft, 0, 0);
PortraitSetFullscreen(libSwaC_gv_zS_PlanetPortrait, true);
PortraitSetOffscreen(libSwaC_gv_zS_PlanetPortrait, false);
PortraitSetVisible(libSwaC_gv_zS_PlanetPortrait, PlayerGroupAll(), true, true);
libSwaC_gf_CinematicFade(false, 0.0, Color(0.00, 0.00, 0.00), true);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:1604
// Implementation
SoundChannelMute(PlayerGroupAll(), c_soundCategoryDoodad, false);
PortraitSetOffscreen(libSwaC_gv_zS_PlanetPortrait, true);
PortraitSetVisible(libSwaC_gv_zS_PlanetPortrait, PlayerGroupAll(), false, false);
if ((libSwaC_gv_zS_PlanetPortraitEvoMissionLight != null)) {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2009
PortraitCreate(0, 0, c_anchorTopLeft, 50, 50, lp_model, "", "Default", false, false);
libVCMI_gv_pM_PlanetPortrait = PortraitLastCreated();
PortraitSetOffscreen(libVCMI_gv_pM_PlanetPortrait, true);
PortraitSetBackgroundVisible(libVCMI_gv_pM_PlanetPortrait, false);
PortraitSetBorderVisible(libVCMI_gv_pM_PlanetPortrait, false);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2025
PortraitSetPosition(libVCMI_gv_pM_PlanetPortrait, c_anchorTopLeft, 0, 0);
PortraitSetFullscreen(libVCMI_gv_pM_PlanetPortrait, true);
PortraitSetOffscreen(libVCMI_gv_pM_PlanetPortrait, false);
PortraitSetVisible(libVCMI_gv_pM_PlanetPortrait, PlayerGroupAll(), true, true);
libVoiC_gf_CinematicFade(false, 0.0, Color(0.00, 0.00, 0.00), true);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2058
// Automatic Variable Declarations
// Implementation
PortraitSetOffscreen(libVCMI_gv_pM_PlanetPortrait, true);
ActorSend(ActorFromPortrait(libVCMI_gv_pM_PlanetPortrait), "AnimClear Custom 0.000000");
return true;
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:2689
PortraitCreate(0, 0, c_anchorTopLeft, 50, 50, lp_model, "", "Default", false, false);
libNCMI_gv_NM_PlanetPortrait = PortraitLastCreated();
PortraitSetOffscreen(libNCMI_gv_NM_PlanetPortrait, true);
PortraitSetBackgroundVisible(libNCMI_gv_NM_PlanetPortrait, false);
PortraitSetBorderVisible(libNCMI_gv_NM_PlanetPortrait, false);
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:2705
PortraitSetPosition(libNCMI_gv_NM_PlanetPortrait, c_anchorTopLeft, 0, 0);
PortraitSetFullscreen(libNCMI_gv_NM_PlanetPortrait, true);
PortraitSetOffscreen(libNCMI_gv_NM_PlanetPortrait, false);
PortraitSetVisible(libNCMI_gv_NM_PlanetPortrait, PlayerGroupAll(), true, true);
libComC_gf_CinematicFade(false, 0.0, Color(0.00, 0.00, 0.00), true);
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:2736
bool auto_libNCMI_gf_HidePlanetPortrait_TriggerFunc (bool testConds, bool runActions) {
// Implementation
PortraitSetOffscreen(libNCMI_gv_NM_PlanetPortrait, true);
ActorSend(ActorFromPortrait(libNCMI_gv_NM_PlanetPortrait), "AnimClear Custom 0.000000");
return true;
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:1189
PortraitCreate(0, 0, c_anchorTopLeft, 50, 50, lp_model, "", "Default", false, false);
libA3DDD02B_gv_pP_PlanetPortrait = PortraitLastCreated();
PortraitSetOffscreen(libA3DDD02B_gv_pP_PlanetPortrait, true);
PortraitSetBackgroundVisible(libA3DDD02B_gv_pP_PlanetPortrait, false);
PortraitSetBorderVisible(libA3DDD02B_gv_pP_PlanetPortrait, false);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:1251
PortraitSetPosition(libA3DDD02B_gv_pP_PlanetPortrait, c_anchorTopLeft, 0, 0);
PortraitSetFullscreen(libA3DDD02B_gv_pP_PlanetPortrait, true);
PortraitSetOffscreen(libA3DDD02B_gv_pP_PlanetPortrait, false);
PortraitSetVisible(libA3DDD02B_gv_pP_PlanetPortrait, PlayerGroupAll(), true, true);
libA3DDD02B_gf_CinematicFade(false, 0.0, Color(0.00, 0.00, 0.00), true);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:1290
// Implementation
SoundChannelMute(PlayerGroupAll(), c_soundCategoryDoodad, false);
PortraitSetOffscreen(libA3DDD02B_gv_pP_PlanetPortrait, true);
ActorSend(ActorFromPortrait(libA3DDD02B_gv_pP_PlanetPortrait), "AnimClear Custom 0.000000");
if ((libA3DDD02B_gv_pP_PlanetPortraitEvoMissionLight != null)) {