compatibleItems: Difference between revisions
Jump to navigation
Jump to search
m (examples) |
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *C([a-eg-z])" to "$1 - c$2") |
||
Line 13: | Line 13: | ||
|p1= weapon: [[String]] - Weapon class name | |p1= weapon: [[String]] - Weapon class name | ||
|r1= [[Array]] of [[String]]s - | |r1= [[Array]] of [[String]]s - compatible attachments | ||
|s2= [[compatibleItems]] [weapon, slot] | |s2= [[compatibleItems]] [weapon, slot] | ||
Line 19: | Line 19: | ||
|p21= weapon: [[String]] - Weapon class name | |p21= weapon: [[String]] - Weapon class name | ||
|p22= slot: [[String]] - | |p22= slot: [[String]] - class name of the slot (defined under '''WeaponSlotsInfo''' class in weapon config) | ||
|r2= [[Array]] of [[String]]s - | |r2= [[Array]] of [[String]]s - compatible attachments | ||
|x1= <sqf> | |x1= <sqf> |
Revision as of 14:00, 8 November 2023
Description
- Description:
- Returns all items (attachments) that can be mounted on the given weapon.
- Groups:
- Weapons
Syntax
- Syntax:
- compatibleItems weapon
- Parameters:
- weapon: String - Weapon class name
- Return Value:
- Array of Strings - compatible attachments
Alternative Syntax
- Syntax:
- compatibleItems [weapon, slot]
- Parameters:
- weapon: String - Weapon class name
- slot: String - class name of the slot (defined under WeaponSlotsInfo class in weapon config)
- Return Value:
- 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", ...]
Additional Information
- See also:
- compatibleMagazines BIS_fnc_compatibleItems canAdd
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note