magazines: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "{{uc:{{PAGENAME}}}}" to "") |
Lou Montana (talk | contribs) 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] | |s2= [[magazines]] [vehicle, includeEmpty] {{since|arma3|1.99.146475|y}} |SYNTAX2= | ||
|p21= | |p21= vehicle: [[Object]] - unit or vehicle |PARAMETER21= | ||
|p22= | |||
|p22= includeEmpty: [[Boolean]] - (Optional, default [[false]]) [[true]] to include empty magazines |PARAMETER22= | |||
| r2=[[Array]] |RETURNVALUE2= | | r2=[[Array]] |RETURNVALUE2= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>_mags | |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> | <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| | [[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 Armed Assault|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Armed Assault| | |||
[[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
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
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
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
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Resistance version 1.75
- Operation Flashpoint: Resistance: New Scripting Commands
- Operation Flashpoint: Resistance: Scripting Commands
- Command Group: Unit Inventory
- Command Group: Vehicle Inventory
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.99
- Scripting Commands Armed Assault
- Scripting Commands Arma 2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters