BIS fnc returnParents: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (pf)
Line 1: Line 1:
{{Function|Comments=
____________________________________________________________________________________________
| arma2 |Game name=
|1.00|Game version=
____________________________________________________________________________________________


{{Function|= Comments
| Returns list of all parent classes. |Description=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
| [config, onlyClassNames] call [[BIS_fnc_returnParents]] |Syntax=


|1.00|= Game version
____________________________________________________________________________________________


| <pre>/*
|p1= config: [[Config]] - Starting config class |Parameter 1=


Description:
|p2= onlyClassNames: [[Boolean]] - (Optional, default [[false]]) [[True]] to return only class names|Parameter 2=
Returns list of all parent classes
Parameter(s):
_this select 0: starting config class (Config)
_this select 1: true if you want to return only classnames (Boolean)
Returns:
Array - List of all classes (including starting one)
*/
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_returnParents]]; --> |= Syntax


|p1= |= Parameter 1
| [[Array]] - List of all classes (including starting one) |Return value=


| |= Return value
<!---
|exec= spawn |= Execution
--->
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[configfile >> "CfgVehicles" >> "Land_FirePlace_F", true] call BIS_fnc_returnParents;  
|x1= <code>[ [[configfile]] >> "CfgVehicles" >> "Land_FirePlace_F", [[true]] ] call [[BIS_fnc_returnParents]];
// ["Land_FirePlace_F","House_F","House","HouseBase","NonStrategic","Building","Static","All"]</code> |=  
//Returns ["Land_FirePlace_F","House_F","House","HouseBase","NonStrategic","Building","Static","All"]</code>|Example 1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[configFile]], [[BIS_fnc_returnChildren]] |See also=
 
}}
}}
<h3 style="display:none">Notes</h3>
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">

Revision as of 13:14, 14 June 2018

Hover & click on the images for description

Description

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

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:
configFileBIS_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

Notes

Bottom Section