getVehicleCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ")
m (Text replacement - "\[\[Arma( |_)3( |_)Vehicle( |_)in( |_)Vehicle( |_)Transport" to "[[Arma 3: Vehicle in Vehicle Transport")
 
(4 intermediate revisions by the same user not shown)
Line 16: Line 16:
|p1= storingVehicle: [[Object]]
|p1= storingVehicle: [[Object]]


|r1=[[Array]] - vehicles loaded in storingVehicle, in order of their loading
|r1= [[Array]] - vehicles loaded in storingVehicle, in order of their loading


|x1= <code>_vehicleCargo = [[getVehicleCargo]] blackfish; {{codecomment|// returns [] if empty}}</code>
|x1= <sqf>_vehicleCargo = getVehicleCargo blackfish; // returns [] if empty</sqf>


|x2= <code>_vehicleCargo = [[getVehicleCargo]] blackfish; {{codecomment|// returns [quad_3, quad_1, quad_2] as they were loaded in this order}}</code>
|x2= <sqf>_vehicleCargo = getVehicleCargo blackfish; // returns [quad_3, quad_1, quad_2] as they were loaded in this order</sqf>


|seealso= [[Arma_3_Vehicle_in_Vehicle_Transport|Vehicle in Vehicle Transport]] [[canVehicleCargo]] [[setVehicleCargo]] [[enableVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]]
|seealso= [[Arma 3: Vehicle in Vehicle Transport|Vehicle in Vehicle Transport]] [[canVehicleCargo]] [[setVehicleCargo]] [[enableVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]]
}}
}}

Latest revision as of 14:55, 14 August 2022

Hover & click on the images for description

Description

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.
Groups:
Vehicle in Vehicle Transport

Syntax

Syntax:
getVehicleCargo storingVehicle
Parameters:
storingVehicle: Object
Return Value:
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

Additional Information

See also:
Vehicle in Vehicle Transport canVehicleCargo setVehicleCargo enableVehicleCargo isVehicleCargo vehicleCargoEnabled

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note