setVehicleCargo: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[(https?\:\/\/.+\.bistudio\.[^ ]+) ([^ ]+)\]" to "{{ExternalLink|link= $1|text= $2}}") |
No edit summary |
||
Line 28: | Line 28: | ||
</code> | </code> | ||
|x3= Unload specific loaded vehicle | |x3= Unload specific loaded vehicle (will paradrop if dropped from high altitude) | ||
<code>_success = [[objNull]] [[setVehicleCargo]] offroad;</code> | <code>_success = [[objNull]] [[setVehicleCargo]] offroad;</code> | ||
|x4= Unload all vehicles | |x4= Unload all vehicles (will paradrop if dropped from high altitude) | ||
<code>_success = blackfish [[setVehicleCargo]] [[objNull]];</code> | <code>_success = blackfish [[setVehicleCargo]] [[objNull]];</code> | ||
Line 44: | Line 44: | ||
<dt class="note">[[User:ImperialAlex|ImperialAlex]]</dt> | <dt class="note">[[User:ImperialAlex|ImperialAlex]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
{{ic|[[objNull] [[setVehicleCargo]] _cargoVehicle}} - will unload specific loaded vehicle, and {{ic|_trasportVehicle [[setVehicleCargo]] [[objNull]]}} will unload all vehicles. The unloaded vehicles will be paradropped if the altitude is high enough. See: {{ExternalLink|link= https://forums.bistudio.com/topic/191678-vehicle-in-vehicle-transport-feedback/page-5#entry3056397|text= BIforums}} | |||
</dd> | </dd> | ||
</dl> | </dl> |
Revision as of 17:26, 2 August 2021
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.
- Groups:
- Vehicle in Vehicle Transport
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 (will paradrop if dropped from high altitude)
_success = objNull setVehicleCargo offroad;
- Example 4:
- Unload all vehicles (will paradrop if dropped from high altitude)
_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
- Posted on July 4, 2016 - 18:46 (UTC)
- ImperialAlex
-
{{ic|[[objNull] setVehicleCargo _cargoVehicle}} - will unload specific loaded vehicle, and
_trasportVehicle setVehicleCargo objNull
will unload all vehicles. The unloaded vehicles will be paradropped if the altitude is high enough. See: BIforums