# Force Portrait Transition On/Off
Grammar — Force Portrait transition onOff with instant set to instant
Flags —Native
|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> — Portraitbool
<preset::OnOffOption> — On/Offbool
— Instant
Returns — void
native void PortraitForceTransition(
int p,
bool isVisible,
bool isInstant,
);
# 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:10343
// Implementation
if ((lp_grayout == true)) {
PortraitForceTransition(PortraitGetPlanetPanel(), true, true);
}
else {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10346
}
else {
PortraitForceTransition(PortraitGetPlanetPanel(), false, false);
}
}
campaigns/liberty.sc2campaign — base.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.sc2map — MapScript.galaxy:10343
// Implementation
if ((lp_grayout == true)) {
PortraitForceTransition(PortraitGetPlanetPanel(), true, true);
}
else {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:10346
}
else {
PortraitForceTransition(PortraitGetPlanetPanel(), false, false);
}
}
campaigns/liberty.sc2campaign/base.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/void.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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);