getVehicleCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "\[\[Arma( |_)3( |_)Vehicle( |_)in( |_)Vehicle( |_)Transport" to "[[Arma 3: Vehicle in Vehicle Transport")
 
(33 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|=
{{RV|type=command
____________________________________________________________________________________________


| arma3dev |= Game name
|game1= arma3
|1.63|= Game version
|version1= 1.62
____________________________________________________________________________________________


| Gets 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.  |= Description
|arg= global
____________________________________________________________________________________________


| getVehicleCargo vehicle |= Syntax
|eff= global


|p1= vehicle: [[Object]]  |= Parameter 1
|gr1= Vehicle in Vehicle Transport


| [[Array]] - if there are no vehicles loaded as cargo an empty array ([]) will be returned, otherwise an array of objects will be returned representing the cargo vehicles |= Return value
|descr= 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.
____________________________________________________________________________________________


|x1= Blackfish with no cargo vehicles
|s1= [[getVehicleCargo]] storingVehicle
<code>_vehicleCargo = getVehicleCargo blackfish; //returns []
</code> |= Example 1
____________________________________________________________________________________________


|x2= Blackfish with cargo vehicles loaded in the order quad_3, quad_1, quad_2
|p1= storingVehicle: [[Object]]
<code>_vehicleCargo = getVehicleCargo blackfish; //returns [quad_3, quad_1, quad_2]
</code> |= Example 2
____________________________________________________________________________________________


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


| [[Arma_3_Vehicle_in_Vehicle_Transport| Vehicle in Vehicle Transport ]] [[canVehicleCargo]] [[setVehicleCargo]] [[enableVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]] |= See Also
|x1= <sqf>_vehicleCargo = getVehicleCargo blackfish; // returns [] if empty</sqf>


|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]]
}}
}}
<h3 style="display:none">Bottom Section</h3>
<!-- Appropriate categories go here -->
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

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