---
name: "isKindOf"
type: command
status: ok
groups: ["Object Manipulation"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/isKindOf
revid: 341247
updated: 2023-05-18T10:50:41Z
---

# isKindOf

*Command · Object Manipulation · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

## Description

Checks whether the given object or type is (a subtype) of the given type.

While [#Syntax 1](../commands/isKindOf.md#syntax-1) and [#Syntax 2](../commands/isKindOf.md#syntax-2) only support **CfgVehicles**, Arma 2 v1.00**CfgAmmo** and **CfgNonAIVehicles**, [#Syntax 3](../commands/isKindOf.md#syntax-3) can be used with any config, including the [mission config](../commands/missionConfigFile.md).

## Syntax

### Syntax 1

```sqf
object isKindOf typeName
```

**Parameters:**

- `object`: [Object](../topics/Object.md)
- `typeName`: [String](../topics/String.md)

**Returns:** [Boolean](../topics/Boolean.md)

### Syntax 2

```sqf
class1 isKindOf class2
```

**Parameters:**

- `class1`: [String](../topics/String.md)
- `class2`: [String](../topics/String.md)

**Returns:** [Boolean](../topics/Boolean.md)

### Syntax 3

*since arma3 1.48*

```sqf
class1 isKindOf [class2, targetConfig]
```

**Parameters:**

- `class1`: [String](../topics/String.md)
- `class2`: [String](../topics/String.md)
- `targetConfig`: [Config](../topics/Config.md)

**Returns:** [Boolean](../topics/Boolean.md)

## Examples

### Example 1

```sqf
vehicle player isKindOf "Tank";
```

### Example 2

```sqf
"BMP2" isKindOf "Tank";
```

### Example 3

```sqf
currentWeapon player isKindOf ["Rifle", configFile >> "CfgWeapons"];
```

### Example 4

```sqf
private _isSoldier = player isKindOf "CAManBase";
```

## See also

[typeOf](../commands/typeOf.md) · [countType](../commands/countType.md) · [inheritsFrom](../commands/inheritsFrom.md) · [configHierarchy](../commands/configHierarchy.md)

## Community notes

**Kronzky** — 2007-04-23

This command can be used on the whole hierarchical class tree (i.e. when checking a HMMWV, one could test for "HMMWV50", "Car", "LandVehicle", etc., all of which would return [true](../commands/true.md).)

---

**James** — 2015-06-16

In case you cannot use [isKindOf](../commands/isKindOf.md) because of the reasons stated, just use [BIS_fnc_returnParents](../functions/BIS_fnc_returnParents.md) with class names as return value:

```sqf
_isKindOf = "Rifle" in [configFile >> "CfgWeapons" >> "BWA3_G36K", true] call BIS_fnc_returnParents; // is true
```

---

**Basstard** — 2015-09-06

In Arma 3 [isKindOf](../commands/isKindOf.md) works well with CfgWeapons and CfgMagazines using the syntax from example 3.

It should be prefered to James' solution as it performs more than 25x faster. Tested in debug console with the following code snippets:

```sqf
"CA_Magazine" in ([configFile >> "CfgMagazines" >> "HandGrenade", true] call BIS_fnc_returnParents);    // 0.12111 ms
"HandGrenade" isKindOf ["CA_Magazine", configFile >> "CfgMagazines"];                                    // 0.00439453 ms
```

When checking in CfgVehicles the syntax from [#Example 2](../commands/isKindOf.md#example-2) performs a little faster.

<sub>Source: [BI Community Wiki — isKindOf](https://community.bistudio.com/wiki/isKindOf) (revision 341247).</sub>
