compatibleMagazines: Difference between revisions
Killzone Kid (talk | contribs) No edit summary |
Lou Montana (talk | contribs) (Add v2.22 ammo support) |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 5: | Line 5: | ||
|descr= Returns all magazines that can be loaded in the given weapon | |descr= Returns all magazines that can be loaded in the given weapon or all magazines containing the provided ammo. No compatible magazines are returned for submunition or missiles. | ||
|gr1= Weapons | |gr1= Weapons | ||
| Line 11: | Line 11: | ||
|s1= [[compatibleMagazines]] weaponOrAmmo | |s1= [[compatibleMagazines]] weaponOrAmmo | ||
|p1= weaponOrAmmo: [[String]] - weapon class name or | |p1= weaponOrAmmo: [[String]] - weapon class name or {{GVI|arma3|2.22|size= 0.75}} ammo 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 or magazines containing given ammo. | ||
|s2= [[compatibleMagazines]] [weapon, muzzle] | |s2= [[compatibleMagazines]] [weapon, muzzle] | ||
| Line 28: | Line 28: | ||
|x3= <sqf>compatibleMagazines ["arifle_Katiba_GL_F", "EGLM"];</sqf> | |x3= <sqf>compatibleMagazines ["arifle_Katiba_GL_F", "EGLM"];</sqf> | ||
|x4= <sqf> | |||
compatibleMagazines "B_65x39_Caseless_green"; // ["30Rnd_65x39_caseless_green", "30Rnd_65x39_caseless_green_mag_Tracer"] | |||
</sqf> | |||
|seealso= [[compatibleWeapons]] [[compatibleItems]] [[BIS_fnc_compatibleMagazines]] [[canAdd]] | |seealso= [[compatibleWeapons]] [[compatibleItems]] [[BIS_fnc_compatibleMagazines]] [[canAdd]] | ||
}} | }} | ||
Latest revision as of 17:40, 20 December 2025
Description
- Description:
- Returns all magazines that can be loaded in the given weapon or all magazines containing the provided ammo. No compatible magazines are returned for submunition or missiles.
- Groups:
- Weapons
Syntax
- Syntax:
- compatibleMagazines weaponOrAmmo
- Parameters:
- weaponOrAmmo: String - weapon class name or
2.22 ammo class name - Return Value:
- Array of Strings - all magazines that can be loaded in any muzzle of the given weapon or magazines containing given ammo.
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"];
- Example 4:
- compatibleMagazines "B_65x39_Caseless_green"; // ["30Rnd_65x39_caseless_green", "30Rnd_65x39_caseless_green_mag_Tracer"]
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note