setAmmoCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *ofp * *\| *1.([0-9]{2}) * +\|([^g]|g[^a])" to " | ofp |1.$1 |game2= ofpe |version2= 1.00 |game3= arma1 |version3= 1.00 |game4= arma2 |version4= 1.00 |game5= arma2oa |version5= 1.50 |game6= tkoh |version6= 1.00 |game7= arm...)
m (Text replacement - " \| *(([^=\| ]+)('''|\[\[)([^=\| ]+)) * +\|p1=" to " |s1= $1 |p1=")
Line 31: Line 31:
The <u>actual</u> '''quantity''' to work with is determined by the model's class in [[CfgVehicles]]
The <u>actual</u> '''quantity''' to work with is determined by the model's class in [[CfgVehicles]]


| vehicleName '''setAmmoCargo''' ammoCargo
|s1=  vehicleName '''setAmmoCargo''' ammoCargo


|p1= vehicleName: [[Object]]
|p1= vehicleName: [[Object]]

Revision as of 00:21, 13 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Vehicle Inventory

Syntax

Syntax:
vehicleName setAmmoCargo ammoCargo
Parameters:
vehicleName: Object
ammoCargo: Number
Return Value:
Nothing

Examples

Example 1:
_ammoTruck1 setAmmoCargo 0.5;

Additional Information

See also:
getAmmoCargosetFuelCargosetRepairCargo

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 31 Aug, 2011
PlacidBox
While the amount of total 'ammo' that can be reloaded is defined in the truck/supply point's CfgVehicles entry, the amount each round of ammunition takes from that total is defined in the CfgAmmo 'Cost' entry for that round. Your typical truck has 300000 ammo capacity, and the tunguska's missiles have a Cost of 50000. So the tunguska can reload a total of 6 missiles from the ammo truck before the ammo capacity is depleted and needs to be set with setAmmoCargo. A similar thing applies with a vehicle's cfgVehicle Cost entry for repairing, and the vehicle's fuelCapacity entry when refuelling.
Posted on July 10, 2015 - 19:27 (UTC)
Waffle SS.
(Arma 3 1.44) setAmmoCargo will have no effect if the vehicle doesn't support getAmmoCargo.