setAmmoCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
 
m (Text replacement - ">Posted on July ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-07-$1")
 
(75 intermediate revisions by 14 users not shown)
Line 1: Line 1:
back to [[Scripting_Reference#S|COMREF]]
{{RV|type=command


<h2 style="color:#000066">'''''vehicle'' setAmmoCargo ''amount'''''</h2>
|game1= ofp
|version1= 1.00


|game2= ofpe
|version2= 1.00


'''Operand types:'''
|game3= arma1
|version3= 1.00


'''vehicle:''' [[Object]]
|game4= arma2
|version4= 1.00


'''amount:''' [[Number]]
|game5= arma2oa
|version5= 1.50


'''Type of returned value:'''
|game6= tkoh
|version6= 1.00


[[Nothing]]
|game7= arma3
|version7= 0.50


'''Description:'''
|arg= local
|eff= global


Set amount or ammo resources in cargo space of rearm vehicle.
|gr1= Vehicle Inventory
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. Amount: 1 is full cargo.
Amount: 1 is full cargo.
 
The <u>actual</u> '''quantity''' to work with is determined by the model's class in [[CfgVehicles]]
 
|s1= vehicleName [[setAmmoCargo]] ammoCargo
 
|p1= vehicleName: [[Object]]
|p2= ammoCargo: [[Number]]
 
|r1= [[Nothing]]
 
|x1= <sqf>_ammoTruck1 setAmmoCargo 0.5;</sqf>
 
|seealso= [[getAmmoCargo]] [[setFuelCargo]] [[setRepairCargo]]
}}
 
<dl class="command_description">
 
<dt></dt>
<dd class="notedate">Posted on 31 Aug, 2011</dd>
<dt class="note">[[User:PlacidBox|PlacidBox]]</dt>
<dd class="note">
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_Config_Reference#cost|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.
 
<dt></dt>
<dd class="notedate">Posted on 2015-07-10 - 19:27 (UTC)</dd>
<dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt>
<dd class="note">
(Arma 3 1.44) '''setAmmoCargo''' will have no effect if the vehicle doesn't support [[getAmmoCargo]].
</dd>
 
</dl>

Latest revision as of 00:09, 14 May 2023

Hover & click on the images for description

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. Amount: 1 is full cargo. 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
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 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 2015-07-10 - 19:27 (UTC)
Waffle SS.
(Arma 3 1.44) setAmmoCargo will have no effect if the vehicle doesn't support getAmmoCargo.