Arma 3 Scripting

isClass

  • Arma 3 v0.50
  • First in Armed Assault v1.00

Command · Markdown · JSON · original wiki page

Description

Check if config entry represents config class.

Syntax

isClass config

Parameters:

Returns: Boolean

Examples

Example 1

_ok = isClass (configFile >> "CfgVehicles");

Result is true.

See also

configFile · a / b · configName · count · getArray · getText · getNumber · inheritsFrom · isArray · isNumber · isText · select

Community notes

Kronzky

This command allows you to check for the presence of an addon. isClass (configFile >> "cfgVehicles" >> "MyCustomCar") will return true if the addon "MyCustomCar" is installed, and false if it is not installed.

You will have to know under which class the addon is categorized (in this case "cfgVehicles") to be able to use the right config path.

ffur2007slx2_5

(Arma 3 ver 1.14) According to BI Dev Karel Mořický, BIS_fnc_getCfgIsClass provides a comfortable workaround with custom config under description.ext compared with isClass. (But as a function created specifically for A3 campaign, it is in no way intended as a replacement for isClass. So it is not suggested to use it for configFile classes. But isClass instead.) E.g.

["Something1", "Something2", "Something3"] call BIS_fnc_getCfgIsClass; // same as isClass (missionConfigFile >> "Something1" >> "Something2" >> "Something3")