BIS fnc uniqueClasses: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "\| *arma3 * * *\| *([0-2]\.[0-9]{2}) * " to "|game1= arma3 |version1= $1 ") |
(Rewrite placeholder) |
||
Line 5: | Line 5: | ||
|gr1= Configs | |gr1= Configs | ||
|descr= | |descr= Composes array of classes with unique param (based on returned value of passed code). If class inherits the param from parent, it's not listed. | ||
|s1= [config, code] call [[BIS_fnc_uniqueClasses]] | |||
|p1= config: [[Config]] - class which is searched | |||
|p2= code: [[Code]] - code executed on class, which is passed as <sqf inline>_this</sqf> | |||
|r1= [[Array]] of classes with unique param in format [<nowiki/>[config, value], ...] where: | |||
* config: [[Config]] - config which defines the parameter value | |||
* value: [[Anything]] - value returned by the specified {{hl|code}} parameter | |||
| | |x1= <sqf>_aiClassTypes = [configFile >> "CfgVehicles", { getText (_x >> "aiBrainType") }] call BIS_fnc_uniqueClasses;</sqf> | ||
|seealso= [[BIS_fnc_returnChildren]] [[BIS_fnc_returnParents]] | |||
|seealso= | |||
}} | }} |
Revision as of 23:26, 24 June 2025
Description
- Description:
- Composes array of classes with unique param (based on returned value of passed code). If class inherits the param from parent, it's not listed.
- Execution:
- call
- Groups:
- Configs
Syntax
- Syntax:
- [config, code] call BIS_fnc_uniqueClasses
- Parameters:
- config: Config - class which is searched
- code: Code - code executed on class, which is passed as _this
- Return Value:
- Array of classes with unique param in format [[config, value], ...] where:
Examples
- Example 1:
Additional Information
- See also:
- BIS_fnc_returnChildren BIS_fnc_returnParents
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