# Transport Property Of Unit

Grammar — Transport valueType|Property of inUnit
FlagsNative | Function

Returns the specified property for the specified unit.

# Arguments

Returns — int

native int UnitCargoValue(unit inUnit, int inValue);

Category: Unit / Cargo

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:361

    }

    if ((UnitCargoValue(lp_transport, c_unitCargoUnitCount) == 0)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:3031

    MinimapPing(PlayerGroupAll(), PointFromId(397), 3.0, Color(0.00, 100.00, 0.00));
    UIAlertPoint("Trigger", 1, StringExternal("Param/Value/E8D7DA1F"), null, PointFromId(397));
    while (!((UnitCargoValue(lv_dropship, c_unitCargoUnitCount) == 0))) {
        Wait(0.5, c_timeGame);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus01.sc2map/MapScript.galaxy:1538

    while (true) {
        Wait(1.0, c_timeGame);
        if ((UnitCargoValue(lv_swannDropship, c_unitCargoUnitCount) == 0)) {
            libCamp_gf_EnableCampaignTechUnit(true, libCamp_ge_StoryTechGroup_StoryTechGroupInfantryMarauder, gv_p1_USER);
            UnitIssueOrder(lv_swannDropship, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(166)), c_orderQueueReplace);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:1092

        }

        if (!((UnitCargoValue(gv_medivac01, c_unitCargoUnitCount) == 0))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:1096

        }

        if (!((UnitCargoValue(gv_medivac02, c_unitCargoUnitCount) == 0))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:361

    if ((UnitGetOwner(lp_victim) == gv_pLAYER_P01_USER)) {
        gv_stat_PlayerUnitsLostToPlatform += 1;
        gv_stat_PlayerUnitsLostToPlatform += UnitCargoValue(lp_victim, c_unitCargoUnitCount);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:369

        UnitBehaviorAdd(lp_victim, "ZergGenericDeath", lp_victim, 1);
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(lp_victim, c_unitCargoUnitCount));
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:384

    if ((UnitGetOwner(lp_victim) == gv_pLAYER_P01_USER)) {
        gv_stat_PlayerUnitsLostToPlatform += 1;
        gv_stat_PlayerUnitsLostToPlatform += UnitCargoValue(lp_victim, c_unitCargoUnitCount);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:396

        UnitBehaviorAdd(lp_victim, "ZergGenericDeath", lp_victim, 1);
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(lp_victim, c_unitCargoUnitCount));
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:7106

        if (auto32CC1F95_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(auto32CC1F95_var, c_unitCargoUnitCount));
        UnitRemove(auto32CC1F95_var);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:7115

        if (auto24D559B3_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(auto24D559B3_var, c_unitCargoUnitCount));
        UnitRemove(auto24D559B3_var);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:7124

        if (autoC2EE9CF0_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(autoC2EE9CF0_var, c_unitCargoUnitCount));
        UnitRemove(autoC2EE9CF0_var);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:7133

        if (auto0E092536_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(auto0E092536_var, c_unitCargoUnitCount));
        UnitRemove(auto0E092536_var);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02b.sc2map/MapScript.galaxy:7142

        if (auto9C9715B1_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(auto9C9715B1_var, c_unitCargoUnitCount));
        UnitRemove(auto9C9715B1_var);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:361

    }

    if ((UnitCargoValue(lp_transport, c_unitCargoUnitCount) == 0)) {
        return true;
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2mapMapScript.galaxy:3031

    MinimapPing(PlayerGroupAll(), PointFromId(397), 3.0, Color(0.00, 100.00, 0.00));
    UIAlertPoint("Trigger", 1, StringExternal("Param/Value/E8D7DA1F"), null, PointFromId(397));
    while (!((UnitCargoValue(lv_dropship, c_unitCargoUnitCount) == 0))) {
        Wait(0.5, c_timeGame);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus01.sc2mapMapScript.galaxy:1538

    while (true) {
        Wait(1.0, c_timeGame);
        if ((UnitCargoValue(lv_swannDropship, c_unitCargoUnitCount) == 0)) {
            libCamp_gf_EnableCampaignTechUnit(true, libCamp_ge_StoryTechGroup_StoryTechGroupInfantryMarauder, gv_p1_USER);
            UnitIssueOrder(lv_swannDropship, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(166)), c_orderQueueReplace);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2mapMapScript.galaxy:1092

        }

        if (!((UnitCargoValue(gv_medivac01, c_unitCargoUnitCount) == 0))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2mapMapScript.galaxy:1096

        }

        if (!((UnitCargoValue(gv_medivac02, c_unitCargoUnitCount) == 0))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:361

    if ((UnitGetOwner(lp_victim) == gv_pLAYER_P01_USER)) {
        gv_stat_PlayerUnitsLostToPlatform += 1;
        gv_stat_PlayerUnitsLostToPlatform += UnitCargoValue(lp_victim, c_unitCargoUnitCount);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:369

        UnitBehaviorAdd(lp_victim, "ZergGenericDeath", lp_victim, 1);
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(lp_victim, c_unitCargoUnitCount));
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:384

    if ((UnitGetOwner(lp_victim) == gv_pLAYER_P01_USER)) {
        gv_stat_PlayerUnitsLostToPlatform += 1;
        gv_stat_PlayerUnitsLostToPlatform += UnitCargoValue(lp_victim, c_unitCargoUnitCount);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:396

        UnitBehaviorAdd(lp_victim, "ZergGenericDeath", lp_victim, 1);
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(lp_victim, c_unitCargoUnitCount));
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:7106

        if (auto32CC1F95_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(auto32CC1F95_var, c_unitCargoUnitCount));
        UnitRemove(auto32CC1F95_var);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:7115

        if (auto24D559B3_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(auto24D559B3_var, c_unitCargoUnitCount));
        UnitRemove(auto24D559B3_var);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:7124

        if (autoC2EE9CF0_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(autoC2EE9CF0_var, c_unitCargoUnitCount));
        UnitRemove(autoC2EE9CF0_var);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:7133

        if (auto0E092536_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(auto0E092536_var, c_unitCargoUnitCount));
        UnitRemove(auto0E092536_var);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02b.sc2mapMapScript.galaxy:7142

        if (auto9C9715B1_var == null) { break; }
        gv_stat_ZergKilledByPlatform += 1;
        gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(auto9C9715B1_var, c_unitCargoUnitCount));
        UnitRemove(auto9C9715B1_var);
    }

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

            if (auto1D1ECC95_var == null) { break; }
            if ((libNtve_gf_UnitIsInsideTransport(auto1D1ECC95_var) == true)) {
                lv_homePosition = PointWithOffsetPolar(UnitGetPosition(UnitTransport(auto1D1ECC95_var)), 1.0, (UnitCargoValue(auto1D1ECC95_var, c_unitCargoPosition) * (360 / UnitCargoValue(UnitTransport(auto1D1ECC95_var), c_unitCargoUnitCount))));
            }
            else {

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

            if (auto1D1ECC95_var == null) { break; }
            if ((libNtve_gf_UnitIsInsideTransport(auto1D1ECC95_var) == true)) {
                lv_homePosition = PointWithOffsetPolar(UnitGetPosition(UnitTransport(auto1D1ECC95_var)), 1.0, (UnitCargoValue(auto1D1ECC95_var, c_unitCargoPosition) * (360 / UnitCargoValue(UnitTransport(auto1D1ECC95_var), c_unitCargoUnitCount))));
            }
            else {

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

            if (auto1D1ECC95_var == null) { break; }
            if ((libNtve_gf_UnitIsInsideTransport(auto1D1ECC95_var) == true)) {
                lv_homePosition = PointWithOffsetPolar(UnitGetPosition(UnitTransport(auto1D1ECC95_var)), 1.0, (UnitCargoValue(auto1D1ECC95_var, c_unitCargoPosition) * (360 / UnitCargoValue(UnitTransport(auto1D1ECC95_var), c_unitCargoUnitCount))));
            }
            else {

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

            if (auto1D1ECC95_var == null) { break; }
            if ((libNtve_gf_UnitIsInsideTransport(auto1D1ECC95_var) == true)) {
                lv_homePosition = PointWithOffsetPolar(UnitGetPosition(UnitTransport(auto1D1ECC95_var)), 1.0, (UnitCargoValue(auto1D1ECC95_var, c_unitCargoPosition) * (360 / UnitCargoValue(UnitTransport(auto1D1ECC95_var), c_unitCargoUnitCount))));
            }
            else {

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:772

    //
    if (!unload) {
        if (UnitCargoValue(aiUnit, c_unitCargoSpaceFree) == 0) {
            return null;
        }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:888

        }
        else { // not a campaign bunker
            if (UnitCargoValue(aiUnit, c_unitCargoSpaceUsed) == 0) { // nothing to unload
                return false;
            }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:895

    }
    else { // nearby enemies found.
        if (UnitCargoValue(aiUnit, c_unitCargoSpaceFree) == 0) { // check for space
            return false;
        }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1134

    }

    if (UnitCargoValue(aiUnit, c_unitCargoSpaceUsed) != 0) {
        return;
    }

mods/liberty.sc2modbase.sc2data/TriggerLibs/LibertyLib.galaxy:1030

    lv_transportTargetPoint = libLbty_gf_ValidatedPoint(libLbty_gv_transportTargetPoint_Param);
    lv_transportDespawnPoint = libLbty_gf_ValidatedPoint(libLbty_gv_transportDespawnPoint_Param);
    if ((UnitCargoValue(lv_transportUnit, c_unitCargoSpaceTotal) == 0)) {
        return true;
    }

mods/liberty.sc2modbase.sc2data/TriggerLibs/LibertyLib.galaxy:1039

        }

        if ((UnitCargoValue(lv_transportUnit, c_unitCargoUnitCount) > 0)) {
            UnitIssueOrder(lv_transportUnit, OrderTargetingPoint(AbilityCommand("MedivacTransport", 2), lv_transportTargetPoint), c_orderQueueReplace);
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:2161

                    if ((PlayerGroupHasPlayer(libCOMI_gf_CM_CoopAI_AttackForce_GetExcludedPlayers(lv_unitTypeIter), lv_player) == false)) {
                        if ((libCOMI_gf_UnitMoverExists(lv_unitTypeToCreate, "Fly") == false)) {
                            if (((lv_transportCurrent[lv_playerIter] == null) || ((UnitCargoValue(lv_transportCurrent[lv_playerIter], c_unitCargoSpaceFree) * 0.75) < (CatalogFieldValueGetAsInt(c_gameCatalogUnit, lv_unitTypeToCreate, "CargoSize", lv_player) + 1)))) {
                                UnitCreate(1, lp_transportType, c_unitCreateIgnorePlacement, lv_player, lp_spawnLocation, PointGetFacing(lp_spawnLocation));
                                lv_transportCurrent[lv_playerIter] = UnitLastCreated();

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:24820

    }

    if ((lv_bunkersize > 0) && (UnitCargoValue(lv_bunker, c_unitCargoSpaceFree) > 0)) {
        UnitCargoCreate(lv_bunker, "SIInfestedTrooper", 1);
        lv_newUnit = UnitCargoLastCreated();

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:748

    //
    if (!unload) {
        if (UnitCargoValue(aiUnit, c_unitCargoSpaceFree) == 0) {
            return null;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:860

    }
    else { // nearby enemies found.
        if (UnitCargoValue(aiUnit, c_unitCargoSpaceFree) == 0) { // check for space
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1117

    }

    if (UnitCargoValue(aiUnit, c_unitCargoSpaceUsed) != 0) {
        return;
    }