BIS fnc weaponComponents: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *C([a-eg-z])" to "$1 - c$2")
 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Weapons


|1.00|= Game version
|descr= Returns array with classname of the parent weapon (without attachments), followed by classnames of all its attachments.<br>
____________________________________________________________________________________________
{{Feature | important | The returned classnames are all converted to lower cases.}}


| <pre>/*--------------------------------------------------------------------------------------------------
|s1= [classname] call [[BIS_fnc_weaponComponents]]


|p1= classname: [[String]] - classname of the parent weapon


Description:
|r1= [[Array]]
Returns array with classname of the plain weapon (without attachments), followed by classnames of all its attachments.


Example:
|x1= <sqf>"arifle_mx_aco_pointer_f" call BIS_fnc_weaponComponents; // ["arifle_mx_f","optic_aco","acc_pointer_ir"]</sqf>
["arifle_mx_f","optic_aco","acc_pointer_ir"] = "arifle_mx_aco_pointer_f" call BIS_fnc_weaponComponents;


Remarks:
|x2= <sqf>"arifle_mx_gl_black_hamr_pointer_f" call BIS_fnc_weaponComponents; // ["arifle_mx_gl_black_f","optic_hamr","acc_pointer_ir"]</sqf>
* Classnames returned are converted all to lowercase.


--------------------------------------------------------------------------------------------------*/
|x3= <sqf>"arifle_mx_black_f" call BIS_fnc_weaponComponents; // ["arifle_mx_f"]</sqf>
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
 
| <!-- [] call [[BIS_fnc_weaponComponents]]; --> |= Syntax
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso=
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:weaponComponents}}]]
[[Category:Functions|{{uc:weaponComponents}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:weaponComponents}}]]

Latest revision as of 14:59, 8 November 2023

Hover & click on the images for description

Description

Description:
Returns array with classname of the parent weapon (without attachments), followed by classnames of all its attachments.
The returned classnames are all converted to lower cases.
Execution:
call
Groups:
Weapons

Syntax

Syntax:
[classname] call BIS_fnc_weaponComponents
Parameters:
classname: String - classname of the parent weapon
Return Value:
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"]

Additional Information

See also:
See also needed

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