Arma 3 Scripting

Command in Weapons

compatibleItems

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns all items (attachments) that can be mounted on the given weapon.

Syntax

Syntax 1

compatibleItems weapon

Parameters:

Returns: Array of Strings - compatible attachments

Syntax 2

compatibleItems [weapon, slot]

Parameters:

Returns: Array of Strings - compatible attachments

Examples

Example 1

compatibleItems "arifle_Katiba_GL_F"; // ["optic_Nightstalker","optic_tws","optic_tws_mg","optic_NVS", ...]

Example 2

compatibleItems ["arifle_Katiba_GL_F", "PointerSlot"]; // ["acc_flashlight","acc_flashlight_broken","acc_pointer_IR", ...]

See also

compatibleWeapons · compatibleMagazines · BIS_fnc_compatibleItems · canAdd