compatibleMagazines: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *W([a-z ])" to "$1 - w$2")
No edit summary
 
Line 19: Line 19:
|p21= weapon: [[String]] - weapon class name
|p21= weapon: [[String]] - weapon class name


|p22= muzzle: [[String]] - muzzle name
|p22= muzzle: [[String]] - muzzle name ("this" is supported for primary muzzle)


|r2= [[Array]] of [[String]]s - all magazines that can be loaded in the given muzzle of the given weapon.
|r2= [[Array]] of [[String]]s - all magazines that can be loaded in the given muzzle of the given weapon.
Line 29: Line 29:
|x3= <sqf>compatibleMagazines ["arifle_Katiba_GL_F", "EGLM"];</sqf>
|x3= <sqf>compatibleMagazines ["arifle_Katiba_GL_F", "EGLM"];</sqf>


|seealso= [[compatibleItems]] [[BIS_fnc_compatibleMagazines]] [[canAdd]]
|seealso= [[compatibleWeapons]] [[compatibleItems]] [[BIS_fnc_compatibleMagazines]] [[canAdd]]
}}
}}

Latest revision as of 21:50, 8 December 2025

Hover & click on the images for description

Description

Description:
Returns all magazines that can be loaded in the given weapon.
Groups:
Weapons

Syntax

Syntax:
compatibleMagazines weapon
Parameters:
weapon: String - weapon class name
Return Value:
Array of Strings - all magazines that can be loaded in any muzzle of the given weapon.

Alternative Syntax

Syntax:
compatibleMagazines [weapon, muzzle]
Parameters:
weapon: String - weapon class name
muzzle: String - muzzle name ("this" is supported for primary muzzle)
Return Value:
Array of Strings - all magazines that can be loaded in the given muzzle of the given weapon.

Examples

Example 1:
compatibleMagazines "arifle_Katiba_GL_F";
Example 2:
compatibleMagazines ["arifle_Katiba_GL_F", "this"];
Example 3:
compatibleMagazines ["arifle_Katiba_GL_F", "EGLM"];

Additional Information

See also:
compatibleWeapons compatibleItems BIS_fnc_compatibleMagazines canAdd

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note