# Cargo Unit In Transport
Grammar — Cargo unit in inUnit|Transport at slot inIndex
Flags —Native
|Function
Returns the unit at the specified index in the specified unit’s cargo hold.
# Arguments
unit
— Unitint
— Index
Returns — unit
native unit UnitCargo(unit inUnit, int inIndex);
# Related
Category: Unit / Cargo
- Put Unit InTransport —
void
— UnitPutInTransport - Create Cargo Units —
void
— UnitCargoCreate - Last Created Cargo Unit —
unit
— UnitCargoLastCreated - Last Created Cargo Units —
unitgroup
— UnitCargoLastCreatedGroup - Unit Is Cargo —
bool
— libNtve_gf_UnitIsInsideTransport - Unit Is Inside Unit Transport —
bool
— libNtve_gf_UnitIsInsideUnitTransport - Unit Is Inside Player Transport —
bool
— libNtve_gf_UnitIsInsidePlayerTransport - Cargo Unit In Transport —
unit
— UnitCargo - Cargo Units In Transport —
unitgroup
— UnitCargoGroup - Transport Property Of Unit —
int
— UnitCargoValue - Transport Of Unit —
unit
— UnitTransport - Unit Loads/Unloads Cargo —
void
— TriggerAddEventUnitCargo - Triggering Cargo Unit —
unit
— EventUnitCargo
# Examples
mods/heromods/dva.stormmod — base.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.stormmod — base.stormdata/LibHDVA.galaxy:1850
lv_dVaMech = EventUnit();
lv_dVaPilot = UnitCargo(lv_dVaMech, 1);
lv_mechXP = UnitXPTotal(lv_dVaMech);
lv_pilotXP = UnitXPTotal(lv_dVaPilot);