Arma 3 Scripting

Command in Object Manipulation

typeOf

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns the class name of given target.

Syntax

typeOf target

Parameters:

Returns: String - config class name, or empty string if target does not have a class

Examples

Example 1

if (typeOf vehicle player == "B_Heli_Light_01_armed_F") then { hint "Player is in a AH-9 Pawnee"; };

Example 2

// Since 2.22
typeOf (findDisplay 313); // "Display3DEN"

See also

countType · isKindOf · configOf · ctrlClassName

Community notes

Hardrock

Try using this on an object pre-placed in the mission editor such as a house:

hint typeOf _object; // Shows the class name (XXX)

Now place an object in the editor, save the map, and open up the Mission.sqm. Find the line: vehicle = "XXX", and replace XXX with the name of the object that you found above. Save it, and load the map. This method is no longer available since Armed Assault.