Arma 3 Scripting

Function in Weapons

BIS_fnc_weaponComponents

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

Description

Returns array with classname of the parent weapon (without attachments), followed by classnames of all its attachments.

Important

The returned classnames are all converted to lower cases.

Syntax

[classname] call BIS_fnc_weaponComponents

Parameters:

Returns: Array

Examples

Example 1

"arifle_mx_aco_pointer_f" call BIS_fnc_weaponComponents; // ["arifle_mx_f","optic_aco","acc_pointer_ir"]

Example 2

"arifle_mx_gl_black_hamr_pointer_f" call BIS_fnc_weaponComponents; // ["arifle_mx_gl_black_f","optic_hamr","acc_pointer_ir"]

Example 3

"arifle_mx_black_f" call BIS_fnc_weaponComponents; // ["arifle_mx_f"]