secondaryWeaponMagazine: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
m (Text replacement - " {3,}\|" to " |")
Line 10: Line 10:


| '''secondaryWeaponMagazine''' unit
| '''secondaryWeaponMagazine''' unit


|p1= unit: [[Object]]
|p1= unit: [[Object]]


| [[Array]]
| [[Array]]


|x1= <code>[[hint]] [[str]] [[secondaryWeaponMagazine]] [[player]]; //["NLAW_F"]
|x1= <code>[[hint]] [[str]] [[secondaryWeaponMagazine]] [[player]]; //["NLAW_F"]
Line 31: Line 29:
};
};
</code>
</code>


| [[secondaryWeapon]], [[secondaryWeaponItems]], [[addSecondaryWeaponItem]], [[primaryWeaponMagazine]], [[handgunMagazine]], [[binocularMagazine]]
| [[secondaryWeapon]], [[secondaryWeaponItems]], [[addSecondaryWeaponItem]], [[primaryWeaponMagazine]], [[handgunMagazine]], [[binocularMagazine]]

Revision as of 18:59, 18 January 2021

Hover & click on the images for description

Description

Description:
Collects all loaded magazines from all secondaryWeapon muzzles and returns them in Array, otherwise it returns []. This command is used for infantry weapons only.
Groups:
Unit Inventory

Syntax

Syntax:
secondaryWeaponMagazine unit
Parameters:
unit: Object
Return Value:
Array

Examples

Example 1:
hint str secondaryWeaponMagazine player; //["NLAW_F"]
Example 2:
_array = secondaryWeaponMagazine player; if (count _array > 0) then { hint ("Secondary weapon is loaded with " + (_array select 0) + "!"); } else { if (secondaryWeapon player != "") then { hint "Secondary weapon is not loaded!"; } else { hint "Player doesn't have a secondary weapon!"; }; };

Additional Information

See also:
secondaryWeaponsecondaryWeaponItemsaddSecondaryWeaponItemprimaryWeaponMagazinehandgunMagazinebinocularMagazine

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