setVehicleCargo
From Bohemia Interactive Community
Click on the images for descriptions
Introduced in
- Game:
- Arma 3
- Version:
- 1.62
Description
- Description:
- Load cargo vehicle inside vehicle if possible, returns bool based on whether the vehicle was able to be loaded. Can also be used to unload a specific loaded vehicle or all loaded vehicles.
Syntax
- Syntax:
- vehicle setVehicleCargo cargo
- Parameters:
- vehicle: Object - vehicle carrying cargo
- cargo: Object - cargo to put in vehicle
- Return Value:
- Boolean - whether the vehicle was able to be loaded
Examples
- Example 1:
- Blackfish with no vehicle cargo loaded
_success = blackfish setVehicleCargo offroad; //true
- Example 2:
- Blackfish with full cargo already loaded
_success = blackfish setVehicleCargo offroad; //false
- Example 3:
- Unload specific loaded vehicle
_success = objNull setVehicleCargo offroad;
- Example 4:
- Unload all vehicles
_success = blackfish setVehicleCargo objNull;
Additional Information
- Multiplayer:
- -
- See also:
- Vehicle in Vehicle Transport canVehicleCargo enableVehicleCargo getVehicleCargo isVehicleCargo vehicleCargoEnabled
Notes
Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To
Add New Note | How To
Bottom Section
- Posted on July 4, 2016 - 18:46 (UTC)
- ImperialAlex
- From biforums: "objnull setVehicleCargo cargo vehicle - will unload specific loaded vehicle" and "transporting vehicle setVehicleCargo objnul - unload all vehicles"