{"name":"typeOf","title":"typeOf","type":"command","url":"https://community.bistudio.com/wiki/typeOf","revid":379309,"updated":"2026-10-30T23:49:22Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.90","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.90","arma3_since":"0.50","description":"Returns the class name of given target.","syntaxes":[{"syntax":"typeOf target","params":[{"name":"target","type":"Object, Arma 3 v2.22 Control or Arma 3 v2.22 Display","type_expr":"Object | Control | Display"}],"returns":{"type":"String","type_expr":"String","description":"config class name, or empty string if target does not have a class","text":"String - config class name, or empty string if *target* does not have a class"},"form":"unary","right":{"text":"target"}}],"examples":[{"code":["if (typeOf vehicle player == \"B_Heli_Light_01_armed_F\") then { hint \"Player is in a AH-9 Pawnee\"; };"]},{"code":["// Since 2.22\ntypeOf (findDisplay 313); // \"Display3DEN\""]}],"see_also":["countType","isKindOf","configOf","ctrlClassName"],"notes":[{"user":"Hardrock","date":"2006-08-04T12:03:00Z","text":"Try using this on an object pre-placed in the mission editor such as a house:\n\n```sqf\nhint typeOf _object; // Shows the class name (XXX)\n```\n\nNow 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.\nSave it, and load the map. This method is no longer available since Armed Assault."}]}