Arma 3 Scripting

Command in Vehicle in Vehicle Transport

getVehicleCargo

Also available as Markdown and JSON, or read the original wiki page.

Description

Get a list of vehicles loaded as cargo inside this vehicle. The returned array is in the order the cargo vehicles were added to containing vehicle.

Syntax

getVehicleCargo storingVehicle

Parameters:

Returns: Array - vehicles loaded in storingVehicle, in order of their loading

Examples

Example 1

_vehicleCargo = getVehicleCargo blackfish; // returns [] if empty

Example 2

_vehicleCargo = getVehicleCargo blackfish; // returns [quad_3, quad_1, quad_2] as they were loaded in this order

See also

Arma 3: Vehicle in Vehicle Transport · canVehicleCargo · setVehicleCargo · enableVehicleCargo · isVehicleCargo · vehicleCargoEnabled