secondaryWeaponMagazine: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "")
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...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma3 |Game name=
| arma3


|0.70|Game version=
|0.70


|gr1= Unit Inventory |GROUP1=
|gr1= Unit Inventory


| Collects all loaded [[magazines]] from all [[secondaryWeapon]] muzzles and returns them in [[Array]], otherwise it returns []. This command is used for infantry weapons only. |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.


| '''secondaryWeaponMagazine''' unit |SYNTAX=
| '''secondaryWeaponMagazine''' unit




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


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




|x1= <code>[[hint]] [[str]] [[secondaryWeaponMagazine]] [[player]]; //["NLAW_F"]
|x1= <code>[[hint]] [[str]] [[secondaryWeaponMagazine]] [[player]]; //["NLAW_F"]
</code>|EXAMPLE1=
</code>


|x2= <code>_array <nowiki>=</nowiki> [[secondaryWeaponMagazine]] [[player]];
|x2= <code>_array <nowiki>=</nowiki> [[secondaryWeaponMagazine]] [[player]];
Line 30: Line 30:
};
};
};
};
</code>|EXAMPLE2=
</code>




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


| |MPBEHAVIOUR=
|
}}
}}



Revision as of 12:02, 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