# Turn Portrait Offscreen On/Off

Grammar — Turn Portrait offscreen Fullscreen
FlagsNative | Action

Sets whether or not the specified portrait is rendered offscreen.

# Arguments

  • int<portrait> — Portrait
  • bool<preset::OnOffOption> — On/Off

Returns — void

native void PortraitSetOffscreen(int p, bool isOffscreen);

Category: Portrait / Advanced

# Examples

campaigns/liberty.sc2campaignbase.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.sc2campaignbase.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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)) {