# Cargo Unit In Transport

Grammar — Cargo unit in inUnit|Transport at slot inIndex
FlagsNative | Function

Returns the unit at the specified index in the specified unit’s cargo hold.

# Arguments

  • unit — Unit
  • int — Index

Returns — unit

native unit UnitCargo(unit inUnit, int inIndex);

Category: Unit / Cargo

# Examples

mods/heromods/dva.stormmodbase.stormdata/LibHDVA.galaxy:607

    }

    lv_pilot = UnitCargo(lv_mech, 1);
    UnitBehaviorAdd(lv_pilot, "HealingFountainCooldown", lv_moonwell, 1);
    UnitCreateEffectUnit(lv_pilot, "FountainApplySet", lv_pilot);

mods/heromods/dva.stormmodbase.stormdata/LibHDVA.galaxy:1850


    lv_dVaMech = EventUnit();
    lv_dVaPilot = UnitCargo(lv_dVaMech, 1);
    lv_mechXP = UnitXPTotal(lv_dVaMech);
    lv_pilotXP = UnitXPTotal(lv_dVaPilot);