# Destroy Portrait
Grammar — Destroy portrait
Flags —Native
|Action
Destroys the specified portrait.
# Arguments
int
<portrait> — Portrait
Returns — void
native void PortraitDestroy(int p);
# 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/tarcade.sc2map/MapScript.galaxy:8527
DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 2.0, 0.0);
Wait(2.0, c_timeGame);
PortraitDestroy(PortraitLastCreated());
DialogDestroy(DialogLastCreated());
UISetWorldVisible(PlayerGroupAll(), true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:3319
gv_newItems[lp_newItemIndex].lv_label = c_invalidDialogControlId;
if ((gv_newItems[lp_newItemIndex].lv_flash != c_invalidPortraitId)) {
PortraitDestroy(gv_newItems[lp_newItemIndex].lv_flash);
gv_newItems[lp_newItemIndex].lv_flash = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10484
gv_zPlanetPanel_Created = false;
if ((gv_zPlanetPanel_PortraitPlanet != c_invalidPortraitId)) {
PortraitDestroy(gv_zPlanetPanel_PortraitPlanet);
gv_zPlanetPanel_PortraitPlanet = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10489
if ((gv_zPlanetPanel_PortraitBorder != c_invalidPortraitId)) {
PortraitDestroy(gv_zPlanetPanel_PortraitBorder);
gv_zPlanetPanel_PortraitBorder = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:13482
lv_index = 1;
for ( ; ( (autoBAF5ECB9_ai >= 0 && lv_index <= autoBAF5ECB9_ae) || (autoBAF5ECB9_ai <= 0 && lv_index >= autoBAF5ECB9_ae) ) ; lv_index += autoBAF5ECB9_ai ) {
PortraitDestroy(gv_briefingPortraits[lv_index]);
}
gv_briefingPortraitCount = 0;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:13555
libNtve_gf_SimpleLookAtStop(gf_ActorUnit(ge_ActorID_ActorRaynor), "InstantStanding");
if ((gv_briefing_TZeratulPortraitZeratul != c_invalidPortraitId)) {
PortraitDestroy(gv_briefing_TZeratulPortraitZeratul);
gv_briefing_TZeratulPortraitZeratul = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19591
PortraitSetVisible(PortraitLastCreated(), PlayerGroupAll(), true, false);
Wait(4.0, c_timeReal);
PortraitDestroy(PortraitLastCreated());
return true;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19620
PortraitSetVisible(PortraitLastCreated(), PlayerGroupAll(), true, false);
Wait(4.0, c_timeReal);
PortraitDestroy(PortraitLastCreated());
return true;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:26432
gf_ClearAnimationwithblendtime(c_animNameDefault, gv_bridgeCommunicator, 0.0);
PortraitDestroy(gv_bridgeCommunicatorPortraitValerian);
return true;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:29121
CameraApplyInfo(1, CameraInfoFromId(93), 0.0, -1, 10, true);
gf_BriefingPlayVideo("BriefingTHanson01_00", lv__Room, ge_BriefingScreen_Center, true);
PortraitDestroy(lv_portaitMiddle);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromModel(libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactHanson)), lv_portaitLeft, SoundLink("THanson01BriefingHanson00010", 0), 0.0, c_transmissionDurationAdd, true);
gf_BriefingPlayVideo("BriefingTHanson01_01", lv__Room, ge_BriefingScreen_Center, true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:30023
PortraitSetChannel(lv_portaitLeft1, 2);
gf_RemoveVisibleUnit(true, gf_BriefingScreen(lv__Room, ge_BriefingScreen_Left));
PortraitDestroy(lv_portaitMiddleHan);
lv_portaitMiddleHan = c_invalidPortraitId;
CameraApplyInfo(1, CameraInfoFromId(704), 0.0, -1, 10, true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:7227
if ((gv_victoryCinematicPortrait != c_invalidPortraitId)) {
PortraitDestroy(gv_victoryCinematicPortrait);
gv_victoryCinematicPortrait = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul04.sc2map/MapScript.galaxy:6769
Wait(lv_fadeDuration, c_timeReal);
UnitPauseAll(true);
PortraitDestroy(gv_victoryPortrait);
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:8527
DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 2.0, 0.0);
Wait(2.0, c_timeGame);
PortraitDestroy(PortraitLastCreated());
DialogDestroy(DialogLastCreated());
UISetWorldVisible(PlayerGroupAll(), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:3319
gv_newItems[lp_newItemIndex].lv_label = c_invalidDialogControlId;
if ((gv_newItems[lp_newItemIndex].lv_flash != c_invalidPortraitId)) {
PortraitDestroy(gv_newItems[lp_newItemIndex].lv_flash);
gv_newItems[lp_newItemIndex].lv_flash = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:10484
gv_zPlanetPanel_Created = false;
if ((gv_zPlanetPanel_PortraitPlanet != c_invalidPortraitId)) {
PortraitDestroy(gv_zPlanetPanel_PortraitPlanet);
gv_zPlanetPanel_PortraitPlanet = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:10489
if ((gv_zPlanetPanel_PortraitBorder != c_invalidPortraitId)) {
PortraitDestroy(gv_zPlanetPanel_PortraitBorder);
gv_zPlanetPanel_PortraitBorder = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:13482
lv_index = 1;
for ( ; ( (autoBAF5ECB9_ai >= 0 && lv_index <= autoBAF5ECB9_ae) || (autoBAF5ECB9_ai <= 0 && lv_index >= autoBAF5ECB9_ae) ) ; lv_index += autoBAF5ECB9_ai ) {
PortraitDestroy(gv_briefingPortraits[lv_index]);
}
gv_briefingPortraitCount = 0;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:13555
libNtve_gf_SimpleLookAtStop(gf_ActorUnit(ge_ActorID_ActorRaynor), "InstantStanding");
if ((gv_briefing_TZeratulPortraitZeratul != c_invalidPortraitId)) {
PortraitDestroy(gv_briefing_TZeratulPortraitZeratul);
gv_briefing_TZeratulPortraitZeratul = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:19591
PortraitSetVisible(PortraitLastCreated(), PlayerGroupAll(), true, false);
Wait(4.0, c_timeReal);
PortraitDestroy(PortraitLastCreated());
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:19620
PortraitSetVisible(PortraitLastCreated(), PlayerGroupAll(), true, false);
Wait(4.0, c_timeReal);
PortraitDestroy(PortraitLastCreated());
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:26432
gf_ClearAnimationwithblendtime(c_animNameDefault, gv_bridgeCommunicator, 0.0);
PortraitDestroy(gv_bridgeCommunicatorPortraitValerian);
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:29121
CameraApplyInfo(1, CameraInfoFromId(93), 0.0, -1, 10, true);
gf_BriefingPlayVideo("BriefingTHanson01_00", lv__Room, ge_BriefingScreen_Center, true);
PortraitDestroy(lv_portaitMiddle);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromModel(libCamp_gf_ContactPortraitModel(libCamp_ge_ContactID_ContactHanson)), lv_portaitLeft, SoundLink("THanson01BriefingHanson00010", 0), 0.0, c_transmissionDurationAdd, true);
gf_BriefingPlayVideo("BriefingTHanson01_01", lv__Room, ge_BriefingScreen_Center, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:30023
PortraitSetChannel(lv_portaitLeft1, 2);
gf_RemoveVisibleUnit(true, gf_BriefingScreen(lv__Room, ge_BriefingScreen_Left));
PortraitDestroy(lv_portaitMiddleHan);
lv_portaitMiddleHan = c_invalidPortraitId;
CameraApplyInfo(1, CameraInfoFromId(704), 0.0, -1, 10, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul02.sc2map — MapScript.galaxy:7227
if ((gv_victoryCinematicPortrait != c_invalidPortraitId)) {
PortraitDestroy(gv_victoryCinematicPortrait);
gv_victoryCinematicPortrait = c_invalidPortraitId;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul04.sc2map — MapScript.galaxy:6769
Wait(lv_fadeDuration, c_timeReal);
UnitPauseAll(true);
PortraitDestroy(gv_victoryPortrait);
return true;
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCST.galaxy:4039
}
else {
PortraitDestroy(libNCST_gv_nS_DebugTimeCodePortrait);
libNCST_gv_nS_DebugTimeCodeActive = false;
}