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 (Text replacement - " +\]" to "]") |
||
(15 intermediate revisions by 3 users not shown) | |||
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 10: | Line 14: | ||
|s1= vehicle [[setVehicleCargo]] cargo | |s1= vehicle [[setVehicleCargo]] cargo | ||
|p1= vehicle: [[Object]] - vehicle carrying cargo | |p1= vehicle: [[Object]] - vehicle for carrying cargo, [[objNull]] to unload specific loaded cargo | ||
|p2= cargo: [[Object]] - cargo to put in vehicle | |p2= cargo: [[Object]] - cargo to put/loaded in vehicle, [[objNull]] to unload all loaded cargo | ||
|r1= [[Boolean]] - whether | |r1= [[Boolean]] - whether or not operation was a success | ||
|x1= Blackfish with no vehicle cargo loaded | |x1= Blackfish with no vehicle cargo loaded | ||
< | <sqf>private _success = blackfish setVehicleCargo offroad; // true</sqf> | ||
</ | |||
|x2= Blackfish with full cargo already loaded | |x2= Blackfish with full cargo already loaded | ||
< | <sqf>private _success = blackfish setVehicleCargo offroad; // false</sqf> | ||
</ | |||
|x3= Unload specific loaded vehicle | |x3= Unload specific loaded vehicle (will paradrop if dropped from high altitude) | ||
< | <sqf>private _success = objNull setVehicleCargo offroad;</sqf> | ||
</ | |||
|x4= Unload all vehicles | |x4= Unload all vehicles (will paradrop if dropped from high altitude) | ||
< | <sqf>private _success = blackfish setVehicleCargo objNull;</sqf> | ||
</ | |||
|seealso= [[ | |seealso= [[Arma 3: Vehicle in Vehicle Transport| Vehicle in Vehicle Transport]] [[canVehicleCargo]] [[enableVehicleCargo]] [[getVehicleCargo]] [[isVehicleCargo]] [[vehicleCargoEnabled]] | ||
}} | }} | ||
{{Note | |||
|user= ImperialAlex | |||
|timestamp= 20160704184600 | |||
< | |text= <sqf inline>objNull setVehicleCargo _cargoVehicle</sqf> - will unload specific loaded vehicle, and <sqf inline>_trasportVehicle setVehicleCargo objNull</sqf> will unload all vehicles. The unloaded vehicles will be paradropped if the altitude is high enough. See: {{Link|link= https://forums.bistudio.com/topic/191678-vehicle-in-vehicle-transport-feedback/page-5#entry3056397|text= BIforums}} | ||
< | }} | ||
Latest revision as of 18:15, 8 November 2023
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 for carrying cargo, objNull to unload specific loaded cargo
- cargo: Object - cargo to put/loaded in vehicle, objNull to unload all loaded cargo
- Return Value:
- Boolean - whether or not operation was a success
Examples
- Example 1:
- Blackfish with no vehicle cargo loaded
- Example 2:
- Blackfish with full cargo already loaded
- Example 3:
- Unload specific loaded vehicle (will paradrop if dropped from high altitude)
- Example 4:
- Unload all vehicles (will paradrop if dropped from high altitude)
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