setVehicleCargo: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (format) |
m (template:command argument fix) |
||
Line 6: | Line 6: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| 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. |= | | 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. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| vehicle [[setVehicleCargo]] cargo |= | | vehicle [[setVehicleCargo]] cargo |SYNTAX= | ||
|p1= vehicle: [[Object]] - vehicle carrying cargo |= | |p1= vehicle: [[Object]] - vehicle carrying cargo |PARAMETER1= | ||
|p2= cargo: [[Object]] - cargo to put in vehicle |= | |p2= cargo: [[Object]] - cargo to put in vehicle |PARAMETER2= | ||
| [[Boolean]] - whether the vehicle was able to be loaded |= | | [[Boolean]] - whether the vehicle was able to be loaded |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= Blackfish with no vehicle cargo loaded | |x1= Blackfish with no vehicle cargo loaded | ||
<code>_success = blackfish [[setVehicleCargo]] offroad; //true | <code>_success = blackfish [[setVehicleCargo]] offroad; //true | ||
</code> |= | </code> |EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x2= Blackfish with full cargo already loaded | |x2= Blackfish with full cargo already loaded | ||
<code>_success = blackfish [[setVehicleCargo]] offroad; //false | <code>_success = blackfish [[setVehicleCargo]] offroad; //false | ||
</code> |= | </code> |EXAMPLE2= | ||
__________________________ | __________________________ | ||
|x3= Unload specific loaded vehicle | |x3= Unload specific loaded vehicle | ||
<code>_success = [[objNull]] [[setVehicleCargo]] offroad; | <code>_success = [[objNull]] [[setVehicleCargo]] offroad; | ||
</code> |= | </code> |EXAMPLE3= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x4= Unload all vehicles | |x4= Unload all vehicles | ||
<code>_success = blackfish [[setVehicleCargo]] [[objNull]]; | <code>_success = blackfish [[setVehicleCargo]] [[objNull]]; | ||
</code> |= | </code> |EXAMPLE4= | ||
__________________________________________________________________ | __________________________________________________________________ | ||
|mp= - |= Multiplayer Behaviour | |mp= - |= Multiplayer Behaviour | ||
| [[Arma_3_Vehicle_in_Vehicle_Transport| Vehicle in Vehicle Transport ]] [[canVehicleCargo]] [[enableVehicleCargo]] [[getVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]] |= | | [[Arma_3_Vehicle_in_Vehicle_Transport| Vehicle in Vehicle Transport ]] [[canVehicleCargo]] [[enableVehicleCargo]] [[getVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]] |SEEALSO= | ||
}} | }} |
Revision as of 14:48, 7 April 2019
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.
- Multiplayer:
- -
- Groups:
- Uncategorised
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
- See also:
- Vehicle in Vehicle Transport canVehicleCargo enableVehicleCargo getVehicleCargo 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
- 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"