magazines: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{uc:{{PAGENAME}}}}" to "")
m (Add since template usage)
Line 16: Line 16:
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''magazines''' vehicle|SYNTAX=
| '''magazines''' vehicle |SYNTAX=


| p1 = vehicle: [[Object]] - unit or vehicle |PARAMETER1=
|p1 = vehicle: [[Object]] - unit or vehicle |PARAMETER1=


| [[Array]] |RETURNVALUE=
| [[Array]] |RETURNVALUE=


| s2= [[magazines]] [vehicle, includeEmpty]        (Since Arma 3 v1.99.146475)|SYNTAX2=
|s2= [[magazines]] [vehicle, includeEmpty] {{since|arma3|1.99.146475|y}} |SYNTAX2=


|p21= [vehicle, includeEmpty]: [[Array]] |PARAMETER21=  
|p21= vehicle: [[Object]] - unit or vehicle |PARAMETER21=
|p22= vehicle: [[Object]] - unit or vehicle.  |PARAMETER22=
 
|p23= includeEmpty (Optional): [[Boolean]] - [[true]] to include empty magazines. Default: [[false]]  |PARAMETER23=  
|p22= includeEmpty: [[Boolean]] - (Optional, default [[false]]) [[true]] to include empty magazines |PARAMETER22=


| r2=[[Array]] |RETURNVALUE2=  
| r2=[[Array]] |RETURNVALUE2=  
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_mags <nowiki>=</nowiki> magazines [[player]]</code> |EXAMPLE1=
|x1= <code>_mags = magazines [[player]]</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[currentMagazine]], [[magazinesTurret]], [[magazinesDetail]], [[magazinesAmmo]], [[magazinesAmmoFull]], [[ammo]], [[weapons]] |SEEALSO=
| [[currentMagazine]], [[magazinesTurret]], [[magazinesDetail]], [[magazinesAmmo]], [[magazinesAmmoFull]], [[ammo]], [[weapons]] |SEEALSO=
}}
}}


Line 42: Line 41:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->


<dt class="note">[[User:Ceeeb|Ceeeb]]
<dt class="note">[[User:Ceeeb|Ceeeb]]</dt>
<dd class="note">
<dd class="note">
In '''OFP v1.96''', if a weapon is loaded with an empty magazine, that magazine will still be counted by this command. The [[ammo|ammo]] command can be used to check if a unit has any ammunition into it is last magazine.
In '''OFP v1.96''', if a weapon is loaded with an empty magazine, that magazine will still be counted by this command. The [[ammo|ammo]] command can be used to check if a unit has any ammunition into it is last magazine.
</dd>


<dd class="notedate">Posted on 25 November 2011
<dd class="notedate">Posted on 25 November 2011</dd>
<dt class="note>'''[[User:Dr_Eyeball|Dr_Eyeball]]'''
<dt class="note>[[User:Dr_Eyeball|Dr_Eyeball]]</dt>
<dd class="note">
<dd class="note">
This command does not include non-turret weapon magazines, such as smoke, flare or chaff magazines which are usually declared in the root of the vehicle's class, rather than in the Turrets hierarchy.
This command does not include non-turret weapon magazines, such as smoke, flare or chaff magazines which are usually declared in the root of the vehicle's class, rather than in the Turrets hierarchy.
</dd>


<!-- Note Section END -->
<!-- Note Section END -->
Line 56: Line 57:
<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>


[[Category:Scripting Commands|MAGAZINES]]
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|MAGAZINES]]
[[Category:Scripting Commands Armed Assault|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Armed Assault|MAGAZINES]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[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}}}}]]

Revision as of 23:07, 23 December 2020

Hover & click on the images for description

Description

Description:
Returns array of type names of all vehicle's magazines. When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use currentMagazine to get this information for a currently loaded magazine.
Groups:
Unit InventoryVehicle Inventory

Syntax

Syntax:
magazines vehicle
Parameters:
vehicle: Object - unit or vehicle
Return Value:
Array

Alternative Syntax

Syntax:
magazines [vehicle, includeEmpty] Template:since
Parameters:
vehicle: Object - unit or vehicle
includeEmpty: Boolean - (Optional, default false) true to include empty magazines
Return Value:
Array

Examples

Example 1:
_mags = magazines player

Additional Information

See also:
currentMagazinemagazinesTurretmagazinesDetailmagazinesAmmomagazinesAmmoFullammoweapons

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

Ceeeb
In OFP v1.96, if a weapon is loaded with an empty magazine, that magazine will still be counted by this command. The ammo command can be used to check if a unit has any ammunition into it is last magazine.
Posted on 25 November 2011
Dr_Eyeball
This command does not include non-turret weapon magazines, such as smoke, flare or chaff magazines which are usually declared in the root of the vehicle's class, rather than in the Turrets hierarchy.

Bottom Section