setVehicleCargo: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ") |
Lou Montana (talk | contribs) m (Add eff) |
||
Line 3: | Line 3: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 1.62 | |version1= 1.62 | ||
|arg= | |||
|eff= global | |||
|gr1= Vehicle in Vehicle Transport | |gr1= Vehicle in Vehicle Transport | ||
Line 17: | Line 21: | ||
|x1= Blackfish with no vehicle cargo loaded | |x1= Blackfish with no vehicle cargo loaded | ||
<code>_success = blackfish [[setVehicleCargo]] offroad; | <code>_success = blackfish [[setVehicleCargo]] offroad; {{cc|true}} | ||
</code> | </code> | ||
|x2= Blackfish with full cargo already loaded | |x2= Blackfish with full cargo already loaded | ||
<code>_success = blackfish [[setVehicleCargo]] offroad; | <code>_success = blackfish [[setVehicleCargo]] offroad; {{cc|false}} | ||
</code> | </code> | ||
|x3= Unload specific loaded vehicle | |x3= Unload specific loaded vehicle | ||
<code>_success = [[objNull]] [[setVehicleCargo]] offroad; | <code>_success = [[objNull]] [[setVehicleCargo]] offroad;</code> | ||
</code> | |||
|x4= Unload all vehicles | |x4= Unload all vehicles | ||
<code>_success = blackfish [[setVehicleCargo]] [[objNull]]; | <code>_success = blackfish [[setVehicleCargo]] [[objNull]];</code> | ||
</code> | |||
|seealso= [[Arma_3_Vehicle_in_Vehicle_Transport| Vehicle in Vehicle Transport ]] [[canVehicleCargo]] [[enableVehicleCargo]] [[getVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]] | |seealso= [[Arma_3_Vehicle_in_Vehicle_Transport| Vehicle in Vehicle Transport ]] [[canVehicleCargo]] [[enableVehicleCargo]] [[getVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]] | ||
Line 42: | Line 44: | ||
<dt class="note">[[User:ImperialAlex|ImperialAlex]]</dt> | <dt class="note">[[User:ImperialAlex|ImperialAlex]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
From [https://forums.bistudio.com/topic/191678-vehicle-in-vehicle-transport-feedback/page-5#entry3056397 | From [https://forums.bistudio.com/topic/191678-vehicle-in-vehicle-transport-feedback/page-5#entry3056397 BIforums]: | ||
"objnull setVehicleCargo cargo vehicle - will unload specific loaded vehicle" and "transporting vehicle setVehicleCargo | "objnull setVehicleCargo cargo vehicle - will unload specific loaded vehicle" and "transporting vehicle setVehicleCargo objnull - unload all vehicles" | ||
</dd> | </dd> | ||
</dl> | </dl> |
Revision as of 11:42, 23 July 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
_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
- Posted on July 4, 2016 - 18:46 (UTC)
- ImperialAlex
- From BIforums: "objnull setVehicleCargo cargo vehicle - will unload specific loaded vehicle" and "transporting vehicle setVehicleCargo objnull - unload all vehicles"