# Force Portrait Transition On/Off

Grammar — Force Portrait transition onOff with instant set to instant
FlagsNative | Action

Forces the transition model of the portrait to on or off. Forcing it on will cause it to render until it is no longer forced on. If the instant parameter is set to false, the transition will play it’s birth (on) or death (off) animation.

# Arguments

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

Returns — void

native void PortraitForceTransition(
	int p,
	bool isVisible,
	bool isInstant,
);

Category: Portrait / Advanced

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10343

    // Implementation
    if ((lp_grayout == true)) {
        PortraitForceTransition(PortraitGetPlanetPanel(), true, true);
    }
    else {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10346

    }
    else {
        PortraitForceTransition(PortraitGetPlanetPanel(), false, false);
    }
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25283

            gf_PlayFidget("BridgeFidgetsStarmap", ge_ActorID_ActorNone, ge_ActorID_ActorNone);
            if ((gv_planetPanel_CurrentSelection == libCamp_ge_PlanetID_PlanetNone)) {
                PortraitForceTransition(PortraitGetPlanetPanel(), true, true);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10343

    // Implementation
    if ((lp_grayout == true)) {
        PortraitForceTransition(PortraitGetPlanetPanel(), true, true);
    }
    else {

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10346

    }
    else {
        PortraitForceTransition(PortraitGetPlanetPanel(), false, false);
    }
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:25283

            gf_PlayFidget("BridgeFidgetsStarmap", ge_ActorID_ActorNone, ge_ActorID_ActorNone);
            if ((gv_planetPanel_CurrentSelection == libCamp_ge_PlanetID_PlanetNone)) {
                PortraitForceTransition(PortraitGetPlanetPanel(), true, true);
            }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:14878

    libVCMI_gf_SendTransmissionCampaign(null, "Tutorial_SC2Core|Line00125", c_transmissionDurationAdd, 0.0, false, libVCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libVCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);
    Wait(1.5, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.25, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:14880

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.25, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.6, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:14882

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.6, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.35, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:14884

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.35, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.7, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:14886

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.7, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.6, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:14888

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.6, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.2, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:14890

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.2, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    TransmissionWait(TransmissionLastSent(), 0.0);
    libVCMI_gf_SendTransmissionCampaign(null, "Tutorial_SC2Core|Line00126", c_transmissionDurationAdd, 0.0, true, libVCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libVCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:14878

    libVCMI_gf_SendTransmissionCampaign(null, "Tutorial_SC2Core|Line00125", c_transmissionDurationAdd, 0.0, false, libVCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libVCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);
    Wait(1.5, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.25, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:14880

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.25, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.6, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:14882

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.6, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.35, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:14884

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.35, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.7, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:14886

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.7, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.6, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:14888

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    Wait(0.6, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.2, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:14890

    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), false, false);
    Wait(1.2, c_timeGame);
    PortraitForceTransition(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), true, false);
    TransmissionWait(TransmissionLastSent(), 0.0);
    libVCMI_gf_SendTransmissionCampaign(null, "Tutorial_SC2Core|Line00126", c_transmissionDurationAdd, 0.0, true, libVCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libVCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);