compatibleMagazines: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - " (\|[pr][0-9]+ *= *[^-]+) *- *A([a-z])" to " $1 - a$2")
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 11: Line 11:
|s1= [[compatibleMagazines]] weapon
|s1= [[compatibleMagazines]] weapon


|p1= weapon: [[String]] - Weapon class name
|p1= weapon: [[String]] - weapon class name


|r1= [[Array]] of [[String]]s - all magazines that can be loaded in '''any muzzle''' of the given weapon.
|r1= [[Array]] of [[String]]s - all magazines that can be loaded in '''any muzzle''' of the given weapon.
Line 17: Line 17:
|s2= [[compatibleMagazines]] [weapon, muzzle]
|s2= [[compatibleMagazines]] [weapon, muzzle]


|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