setAmmoCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also, note formatting)
m (template:command argument fix)
(4 intermediate revisions by 3 users not shown)
Line 3: Line 3:


| ofp |= Game name
| ofp |= Game name
|1.00|= Game version
|1.00|= Game version
|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.
| 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]]  |= Description
The <u>actual</u> '''quantity''' to work with is determined by the model's class in [[CfgVehicles]]  |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| vehicleName '''setAmmoCargo''' ammoCargo |= Syntax
| vehicleName '''setAmmoCargo''' ammoCargo |SYNTAX=


|p1= vehicleName: [[Object]] |= Parameter 1
|p1= vehicleName: [[Object]] |PARAMETER1=
|p2= ammoCargo: [[Number]] |= Parameter 2
|p2= ammoCargo: [[Number]] |PARAMETER2=


| [[Nothing]] |= Return value
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code> _ammoTruck1 setAmmoCargo 0.5; </code> |= Example 1
|x1= <code> _ammoTruck1 setAmmoCargo 0.5; </code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[getAmmoCargo]], [[setFuelCargo]], [[setRepairCargo]] |= See also
| [[getAmmoCargo]], [[setFuelCargo]], [[setRepairCargo]] |SEEALSO=
}}
}}


Line 31: Line 32:
<dd class="notedate">Posted on 31 Aug, 2011
<dd class="notedate">Posted on 31 Aug, 2011
<dt class="note">'''[[User:PlacidBox|PlacidBox]]'''<dd class="note">
<dt class="note">'''[[User:PlacidBox|PlacidBox]]'''<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 '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.


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.
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.
Line 41: Line 42:
<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|SETAMMOCARGO]]
[[Category:Scripting Commands|SETAMMOCARGO]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|SETAMMOCARGO]]
[[Category:Scripting Commands OFP 1.96|SETAMMOCARGO]]
[[Category:Scripting Commands OFP 1.46|SETAMMOCARGO]]
[[Category:Scripting Commands OFP 1.46|SETAMMOCARGO]]
Line 48: Line 50:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{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>
<dd class="note">
(ArmA 3 1.44) '''setAmmoCargo''' will have no effect if the vehicle doesn't support [[getAmmoCargo]].
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 15:46, 7 April 2019

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:
Uncategorised

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

Notes

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.

Bottom Section

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.