Page tree
Skip to end of metadata
Go to start of metadata




Introduced in

Version:1.48

Description

Description:Checks whether one class inherits from another. Alternative to isKindOf, but works with any configuration file.

Syntax

Syntax:[config, child, parent] call fn_vbs_isKindOf
Parameters:
  • config: Config-2 - Configuration file to check.
  • child: Object, Config-2 or String - Class whose inheritance is checked. Can be an object, a configuration entry, or a class name.
  • parent: Config-2, String or Array - Parent class that is checked. Can be a configuration entry or a class name, or an array containing several of either.
Return Value:Boolean - Returns true, if child inherits from parent.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
_isPistol = [configFile>>"CfgWeapons","vbs2_Glock17","vbs2_pistolCore"] call fn_vbs_isKindOf
_isMan = [configFile>>"CfgVehicles",player,["man","vbs2_man"]] call fn_vbs_isKindOf

Additional Information

See also: isKindOf, objectType
Multiplayer: 
Problems: 

Notes