getVehicleCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (format)
m (Fix page format and examples)
Line 6: Line 6:
____________________________________________________________________________________________
____________________________________________________________________________________________


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


| getVehicleCargo vehicle |= Syntax
| [[getVehicleCargo]] storingVehicle |= Syntax


|p1= vehicle: [[Object]]  |= Parameter 1
|p1= storingVehicle: [[Object]]  |= Parameter 1


| [[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
| [[Array]] - vehicles loaded in storingVehicle, in order of their loading |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= Blackfish with no cargo vehicles
|x1= <code>_vehicleCargo = [[getVehicleCargo]] blackfish; {{codecomment|// returns [] if empty}}</code> |= Example 1
<code>_vehicleCargo = [[getVehicleCargo]] blackfish; //returns []
</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


|x2= Blackfish with cargo vehicles loaded in the order quad_3, quad_1, quad_2
|x2= <code>_vehicleCargo = [[getVehicleCargo]] blackfish; {{codecomment|// returns [quad_3, quad_1, quad_2] as they were loaded in this order}}</code> |= Example 2
<code>_vehicleCargo = [[getVehicleCargo]] blackfish; //returns [quad_3, quad_1, quad_2]
</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________


|mp= - |= Multiplayer Behaviour
| [[Arma_3_Vehicle_in_Vehicle_Transport|Vehicle in Vehicle Transport]] [[canVehicleCargo]] [[setVehicleCargo]] [[enableVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]] |= See Also
 
| [[Arma_3_Vehicle_in_Vehicle_Transport| Vehicle in Vehicle Transport ]] [[canVehicleCargo]] [[setVehicleCargo]] [[enableVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]] |= See Also


}}
}}
Line 37: Line 31:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Arma_3:_New_Scripting_Commands_List]]

Revision as of 17:36, 28 March 2018

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:
Uncategorised

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

Bottom Section