BIS fnc returnParents: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Configs(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Text replacement - ">\[ +(.*) *\] +(call|spawn)" to ">[$1] $2")
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|gr1= Configs |GROUP1=
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| Returns list of all parent classes. |Description=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| [config, onlyClassNames] call [[BIS_fnc_returnParents]] |Syntax=
|gr1= Configs


|descr= Returns list of all parent classes.


|p1= config: [[Config]] - Starting config class |Parameter 1=
|s1= [config, onlyClassNames] call [[BIS_fnc_returnParents]]


|p2= onlyClassNames: [[Boolean]] - (Optional, default [[false]]) [[True]] to return only class names|Parameter 2=
|p1= config: [[Config]] - starting config class


|p2= onlyClassNames: [[Boolean]] - (Optional, default [[false]]) [[true]] to return only class names


| [[Array]] - List of all classes (including starting one) |Return value=
|r1= [[Array]] - list of all classes (including starting one)


<!---
|x1= <sqf>[configFile >> "CfgVehicles" >> "Land_FirePlace_F", true] call BIS_fnc_returnParents;
|exec= spawn |Execution=
//Returns ["Land_FirePlace_F","House_F","House","HouseBase","NonStrategic","Building","Static","All"]</sqf>
--->
____________________________________________________________________________________________


|x1= <code>[ [[configFile]] >> "CfgVehicles" >> "Land_FirePlace_F", [[true]] ] call [[BIS_fnc_returnParents]];
|seealso= [[configFile]] [[BIS_fnc_returnChildren]]
//Returns ["Land_FirePlace_F","House_F","House","HouseBase","NonStrategic","Building","Static","All"]</code>|Example 1=
____________________________________________________________________________________________
 
| [[configFile]], [[BIS_fnc_returnChildren]] |See also=
}}
}}
<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:Functions|{{uc:returnParents}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:returnParents}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:returnParents}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:returnParents}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:returnParents}}]]

Latest revision as of 17:27, 8 November 2023

Hover & click on the images for description

Description

Description:
Returns list of all parent classes.
Execution:
call
Groups:
Configs

Syntax

Syntax:
[config, onlyClassNames] call BIS_fnc_returnParents
Parameters:
config: Config - starting config class
onlyClassNames: Boolean - (Optional, default false) true to return only class names
Return Value:
Array - list of all classes (including starting one)

Examples

Example 1:
[configFile >> "CfgVehicles" >> "Land_FirePlace_F", true] call BIS_fnc_returnParents; //Returns ["Land_FirePlace_F","House_F","House","HouseBase","NonStrategic","Building","Static","All"]

Additional Information

See also:
configFile BIS_fnc_returnChildren

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