# Unit Is Under Construction

Grammaru is under construction
FlagsFunction

Returns true if a unit is under construction. This function does not work for dead units.

# Arguments

  • unit — Unit

Returns — bool

bool libNtve_gf_UnitIsUnderConstruction(unit lp_u);

Category: Unit / Progress And Queues

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor03.sc2map/MapScript.galaxy:4140

            auto78D96694_var = UnitGroupUnitFromEnd(auto78D96694_g, auto78D96694_u);
            if (auto78D96694_var == null) { break; }
            if ((UnitIsAlive(auto78D96694_var) == true) && (libNtve_gf_UnitIsUnderConstruction(auto78D96694_var) == false) && (UnitGetPropertyFixed(auto78D96694_var, c_unitPropLifePercent, c_unitPropCurrent) < 100.0)) {
                lv_damagedBunker = auto78D96694_var;
                lv_damagedPoint = PointWithOffset(UnitGetPosition(lv_damagedBunker), 0.0, -4.0);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/traynor03.sc2mapMapScript.galaxy:4140

            auto78D96694_var = UnitGroupUnitFromEnd(auto78D96694_g, auto78D96694_u);
            if (auto78D96694_var == null) { break; }
            if ((UnitIsAlive(auto78D96694_var) == true) && (libNtve_gf_UnitIsUnderConstruction(auto78D96694_var) == false) && (UnitGetPropertyFixed(auto78D96694_var, c_unitPropLifePercent, c_unitPropCurrent) < 100.0)) {
                lv_damagedBunker = auto78D96694_var;
                lv_damagedPoint = PointWithOffset(UnitGetPosition(lv_damagedBunker), 0.0, -4.0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zkorhal01.sc2map/MapScript.galaxy:2729

    }

    if ((UnitIsAlive(gv_bileLaunchers[1]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[1]) == false)) {
        if ((UnitIsAlive(UnitFromId(60)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(60), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zkorhal01.sc2map/MapScript.galaxy:2743


    Wait(1.0, c_timeAI);
    if ((UnitIsAlive(gv_bileLaunchers[2]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[2]) == false)) {
        if ((UnitIsAlive(UnitFromId(707)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(707), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zkorhal01.sc2map/MapScript.galaxy:2757


    Wait(1.0, c_timeAI);
    if ((UnitIsAlive(gv_bileLaunchers[3]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[3]) == false)) {
        if ((UnitIsAlive(UnitFromId(1129)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(1129), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zkorhal01.sc2map/MapScript.galaxy:2771


    Wait(1.0, c_timeAI);
    if ((UnitIsAlive(gv_bileLaunchers[4]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[4]) == false)) {
        if ((UnitIsAlive(UnitFromId(47)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(47), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zkorhal01.sc2map/MapScript.galaxy:2785


    Wait(1.0, c_timeAI);
    if ((UnitIsAlive(gv_bileLaunchers[5]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[5]) == false)) {
        if ((UnitIsAlive(UnitFromId(1110)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(1110), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zspace02.sc2map/MapScript.galaxy:3941

    lv_local_Virophage = UnitLastCreated();
    libSwaC_gf_SetUnitInfoTextCampaign(UnitLastCreated(), null, StringExternal("Param/Value/E6D9D4E1"), null);
    while (!((libNtve_gf_UnitIsUnderConstruction(lv_local_Virophage) == false))) {
        Wait(1.0, c_timeGame);
    }

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal01.sc2mapMapScript.galaxy:2729

    }

    if ((UnitIsAlive(gv_bileLaunchers[1]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[1]) == false)) {
        if ((UnitIsAlive(UnitFromId(60)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(60), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal01.sc2mapMapScript.galaxy:2743


    Wait(1.0, c_timeAI);
    if ((UnitIsAlive(gv_bileLaunchers[2]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[2]) == false)) {
        if ((UnitIsAlive(UnitFromId(707)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(707), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal01.sc2mapMapScript.galaxy:2757


    Wait(1.0, c_timeAI);
    if ((UnitIsAlive(gv_bileLaunchers[3]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[3]) == false)) {
        if ((UnitIsAlive(UnitFromId(1129)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(1129), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal01.sc2mapMapScript.galaxy:2771


    Wait(1.0, c_timeAI);
    if ((UnitIsAlive(gv_bileLaunchers[4]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[4]) == false)) {
        if ((UnitIsAlive(UnitFromId(47)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(47), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal01.sc2mapMapScript.galaxy:2785


    Wait(1.0, c_timeAI);
    if ((UnitIsAlive(gv_bileLaunchers[5]) == true) && (libNtve_gf_UnitIsUnderConstruction(gv_bileLaunchers[5]) == false)) {
        if ((UnitIsAlive(UnitFromId(1110)) == true)) {
            libNtve_gf_ChangeUnitDamage(UnitFromId(1110), libNtve_ge_UnitDamageTakenDealt_Damage_Take, libNtve_ge_UnitDamageChangeOption_Full);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zspace02.sc2mapMapScript.galaxy:3941

    lv_local_Virophage = UnitLastCreated();
    libSwaC_gf_SetUnitInfoTextCampaign(UnitLastCreated(), null, StringExternal("Param/Value/E6D9D4E1"), null);
    while (!((libNtve_gf_UnitIsUnderConstruction(lv_local_Virophage) == false))) {
        Wait(1.0, c_timeGame);
    }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pkorhal02.sc2map/MapScript.galaxy:4948

        }

        if (!((libNtve_gf_UnitIsUnderConstruction(EventUnit()) == false))) {
            return false;
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pulnar02.sc2map/MapScript.galaxy:3341

    UnitBehaviorAdd(EventUnitProgressUnit(), "QuickWarp", EventUnitProgressUnit(), 1);
    auto600D0BCE_at = 0;
    while (!((libNtve_gf_UnitIsUnderConstruction(EventUnitProgressUnit()) == false)) && auto600D0BCE_at <= 2.5) {
        Wait(0.0625, c_timeGame);
        auto600D0BCE_at = auto600D0BCE_at + 0.0625;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/sc2epilogue01.sc2map/MapScript.galaxy:3700

        }

        if (!((libNtve_gf_UnitIsUnderConstruction(EventUnit()) == false))) {
            return false;
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pkorhal02.sc2mapMapScript.galaxy:4948

        }

        if (!((libNtve_gf_UnitIsUnderConstruction(EventUnit()) == false))) {
            return false;
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar02.sc2mapMapScript.galaxy:3341

    UnitBehaviorAdd(EventUnitProgressUnit(), "QuickWarp", EventUnitProgressUnit(), 1);
    auto600D0BCE_at = 0;
    while (!((libNtve_gf_UnitIsUnderConstruction(EventUnitProgressUnit()) == false)) && auto600D0BCE_at <= 2.5) {
        Wait(0.0625, c_timeGame);
        auto600D0BCE_at = auto600D0BCE_at + 0.0625;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/sc2epilogue01.sc2mapMapScript.galaxy:3700

        }

        if (!((libNtve_gf_UnitIsUnderConstruction(EventUnit()) == false))) {
            return false;
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:3478

    }
    if ((libVoiC_gv_pCX_UpgradesTaught == false) && (libVCMI_gv_pM_UpgradeUnit == null) && (UnitGetType(lp_teachUnit) == "CyberneticsCore") && (TechTreeUpgradeIsAllowed(1, "ProtossAirWeaponsLevel1") == true) && (libVoiC_gf_PC_CampaignInEpilogue() == false)) {
        if ((libNtve_gf_UnitIsUnderConstruction(lp_teachUnit) == true)) {
            while (true) {
                if ((UnitIsAlive(lp_teachUnit) == false)) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:3484

                }

                if ((libNtve_gf_UnitIsUnderConstruction(lp_teachUnit) == false)) {
                    break;
                }