BIS_fnc_compatibleMagazines

From Bohemia Interactive Community
Revision as of 13:39, 8 November 2023 by Lou Montana (talk | contribs) (Text replacement - " (\|[pr][0-9]+ *= *[^-]+) *- *A([a-z])" to " $1 - a$2")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
🕖
This information is obsolete as of Arma 3 v2.10. Reason: Use compatibleMagazines instead.
Gets all compatible magazines for selected weapons. Function looks both for magazines listed in magazines array and compatible magazineWells.
Execution:
call
Groups:
Weapons

Syntax

Syntax:
[weapon, returnHidden] call BIS_fnc_compatibleMagazines
Parameters:
weapon: String - weapon's classname
returnHidden: Boolean - (Optional, default false) true to also return magazines with scope 1
Return Value:
Array - array of magazine classes

Examples

Example 1:
["arifle_mx_f"] call BIS_fnc_compatibleMagazines;

Additional Information

See also:
currentMagazine currentWeapon compatibleMagazines

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
PierreMGI - c
Posted on Sep 01, 2020 - 18:59 (UTC)
This function returns all magazines in lower case.
Example:
currentMagazine player; // "30Rnd_762x39_AK12_Mag_F" currentWeapon player call BIS_fnc_compatibleMagazines; // ["30rnd_762x39_ak12_mag_f", ...] currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // never works toLowerANSI currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // works