compatibleWeapons

From Bohemia Interactive Community
Revision as of 15:24, 9 December 2025 by Lou Montana (talk | contribs) (Add devBranch)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.22.

Description

Description:
Returns all compatible weapons for given weapon item, weapon magazine or weapon slot.
Groups:
Weapons

Syntax

Syntax:
compatibleWeapons name
Parameters:
name: String - weapon item (see compatibleItems), weapon magazine (see compatibleMagazines) or weapon slot (defined under WeaponSlotsInfo class in weapon config), for example:
  • "CowsSlot" for optics
  • "MuzzleSlot" for silencers
  • "PointerSlot" for laser pointers and flashlights
  • "UnderBarrelSlot" for bipods
Return Value:
Array of Arrays in format:
  • [weapon, slot] - for weapon items
  • [weapon, muzzle] - for weapon magazines (primary muzzle returned as "this")
  • [weapon, slot] - for weapon slot

Examples

Example 1:
compatibleWeapons "LaserBatteries"; // [["Laserdesignator_pilotCamera","this"],["Laserdesignator_mounted","this"],...]
Example 2:
compatibleWeapons "PointerSlot"; // [["arifle_MX_ACO_pointer_F","PointerSlot"],["arifle_TRG21_F","PointerSlot"],...]
Example 3:
compatibleWeapons "1Rnd_HE_Grenade_shell"; // [["arifle_Katiba_GL_F","EGLM"],["arifle_Katiba_GL_ACO_F","EGLM"],...]
Example 4:
compatibleWeapons "bipod_01_F_blk"; // [["arifle_MX_ACO_pointer_F","UnderBarrelSlot"],["arifle_MX_F","UnderBarrelSlot"],...]

Additional Information

See also:
compatibleItems compatibleMagazines BIS_fnc_compatibleItems canAdd

Notes

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