setAmmoCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (Text replacement - ">Posted on July ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-07-$1")
 
(48 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|1.00|= Game version
|version1= 1.00
|arg= local|= Arguments in MP
|eff= global|= Effects in MP
____________________________________________________________________________________________


| 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.
|game2= ofpe
|version2= 1.00


The <u>actual</u> '''quantity''' to work with is determined by the model's class in [[CfgVehicles]]  |DESCRIPTION=
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| vehicleName '''setAmmoCargo''' ammoCargo |SYNTAX=
|game4= arma2
|version4= 1.00


|p1= vehicleName: [[Object]] |PARAMETER1=
|game5= arma2oa
|p2= ammoCargo: [[Number]] |PARAMETER2=
|version5= 1.50


| [[Nothing]] |RETURNVALUE=
|game6= tkoh
____________________________________________________________________________________________
|version6= 1.00


|x1= <code> _ammoTruck1 setAmmoCargo 0.5; </code> |EXAMPLE1=
|game7= arma3
____________________________________________________________________________________________
|version7= 0.50


| [[getAmmoCargo]], [[setFuelCargo]], [[setRepairCargo]] |SEEALSO=
|arg= local
|eff= global
 
|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. 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]]
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
 
<dd class="notedate">Posted on 31 Aug, 2011
<dt></dt>
<dt class="note">'''[[User:PlacidBox|PlacidBox]]'''<dd class="note">
<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.
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.


Line 37: Line 54:


A similar thing applies with a vehicle's cfgVehicle Cost entry for repairing, and the vehicle's fuelCapacity entry when refuelling.
A similar thing applies with a vehicle's cfgVehicle Cost entry for repairing, and the vehicle's fuelCapacity entry when refuelling.
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
<dt></dt>
[[Category:Scripting Commands|SETAMMOCARGO]]
<dd class="notedate">Posted on 2015-07-10 - 19:27 (UTC)</dd>
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|SETAMMOCARGO]]
[[Category:Scripting Commands OFP 1.46|SETAMMOCARGO]]
[[Category:Scripting Commands ArmA|SETAMMOCARGO]]
[[Category:Command_Group:_Weapons|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on July 10, 2015 - 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">
(ArmA 3 1.44) '''setAmmoCargo''' will have no effect if the vehicle doesn't support [[getAmmoCargo]].
(Arma 3 1.44) '''setAmmoCargo''' will have no effect if the vehicle doesn't support [[getAmmoCargo]].
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

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.