setAmmoCargo: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
BrettMayson (talk | contribs) mNo edit summary |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 27: | Line 27: | ||
|gr1= Vehicle Inventory | |gr1= Vehicle Inventory | ||
|descr= Set amount of ammo resources in cargo space of a rearm vehicle. Ammo resource is used to resupply vehicles that take ammo. Soldiers use individual magazines instead | |descr= Set amount of ammo resources in cargo space of a rearm vehicle. Ammo resource is used to resupply vehicles that take ammo. Soldiers use individual magazines instead. | ||
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]] | ||
| Line 34: | Line 34: | ||
|p1= vehicleName: [[Object]] | |p1= vehicleName: [[Object]] | ||
|p2= ammoCargo: [[Number]] | |p2= ammoCargo: [[Number]] in range 0..1 | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>_ammoTruck1 setAmmoCargo 0.5;</sqf> | ||
|seealso= [[getAmmoCargo]] [[setFuelCargo]] [[setRepairCargo]] | |seealso= [[getAmmoCargo]] [[setFuelCargo]] [[setRepairCargo]] | ||
| Line 56: | Line 56: | ||
<dt></dt> | <dt></dt> | ||
<dd class="notedate">Posted on | <dd class="notedate">Posted on 2015-07-10 - 19:27 (UTC)</dd> | ||
<dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt> | <dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
Latest revision as of 06:54, 1 January 2026
Description
- Description:
- Set amount of ammo resources in cargo space of a rearm vehicle. Ammo resource is used to resupply vehicles that take ammo. Soldiers use individual magazines instead. The actual quantity to work with is determined by the model's class in CfgVehicles
- Groups:
- Vehicle Inventory
Syntax
- Syntax:
- vehicleName setAmmoCargo ammoCargo
- Parameters:
- vehicleName: Object
- ammoCargo: Number in range 0..1
- Return Value:
- Nothing
Examples
- Example 1:
- _ammoTruck1 setAmmoCargo 0.5;
Additional Information
- See also:
- getAmmoCargo setFuelCargo setRepairCargo
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
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 2015-07-10 - 19:27 (UTC)
- Waffle SS.
- (Arma 3 1.44) setAmmoCargo will have no effect if the vehicle doesn't support getAmmoCargo.
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Vehicle Inventory
- Scripting Commands: Global Effect