# Destroy Portrait

Grammar — Destroy portrait
FlagsNative | Action

Destroys the specified portrait.

# Arguments

  • int<portrait> — Portrait

Returns — void

native void PortraitDestroy(int p);

Category: Portrait / Advanced

# Examples

campaigns/liberty.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19591

    PortraitSetVisible(PortraitLastCreated(), PlayerGroupAll(), true, false);
    Wait(4.0, c_timeReal);
    PortraitDestroy(PortraitLastCreated());
    return true;
}

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

    PortraitSetVisible(PortraitLastCreated(), PlayerGroupAll(), true, false);
    Wait(4.0, c_timeReal);
    PortraitDestroy(PortraitLastCreated());
    return true;
}

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


    gf_ClearAnimationwithblendtime(c_animNameDefault, gv_bridgeCommunicator, 0.0);
    PortraitDestroy(gv_bridgeCommunicatorPortraitValerian);
    return true;
}

campaigns/liberty.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:7227


    if ((gv_victoryCinematicPortrait != c_invalidPortraitId)) {
        PortraitDestroy(gv_victoryCinematicPortrait);
        gv_victoryCinematicPortrait = c_invalidPortraitId;
    }

campaigns/liberty.sc2campaignbase.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.galaxy:19591

    PortraitSetVisible(PortraitLastCreated(), PlayerGroupAll(), true, false);
    Wait(4.0, c_timeReal);
    PortraitDestroy(PortraitLastCreated());
    return true;
}

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

    PortraitSetVisible(PortraitLastCreated(), PlayerGroupAll(), true, false);
    Wait(4.0, c_timeReal);
    PortraitDestroy(PortraitLastCreated());
    return true;
}

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


    gf_ClearAnimationwithblendtime(c_animNameDefault, gv_bridgeCommunicator, 0.0);
    PortraitDestroy(gv_bridgeCommunicatorPortraitValerian);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.galaxy:7227


    if ((gv_victoryCinematicPortrait != c_invalidPortraitId)) {
        PortraitDestroy(gv_victoryCinematicPortrait);
        gv_victoryCinematicPortrait = c_invalidPortraitId;
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul04.sc2mapMapScript.galaxy:6769

    Wait(lv_fadeDuration, c_timeReal);
    UnitPauseAll(true);
    PortraitDestroy(gv_victoryPortrait);
    return true;
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:4039

    }
    else {
        PortraitDestroy(libNCST_gv_nS_DebugTimeCodePortrait);
        libNCST_gv_nS_DebugTimeCodeActive = false;
    }