{"name":"typeOf","operator":null,"title":"typeOf","type":"command","url":"https://community.bistudio.com/wiki/typeOf","revid":378246,"updated":"2026-03-21T09:42:52Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.90"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.90"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the class name of given target.","syntaxes":[{"syntax":"typeOf target","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":"Object, since Arma 3 v2.22 Control, Display","optional":false,"default":null,"description":null,"types":["Object","Control","Display"],"since":null,"text":"target: Object, since Arma 3 v2.22 Control, Display"}],"returns":{"type":"String","types":["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","operator":null,"left":null,"right":{"text":"target","types":["Object","Control","Display"]}}],"examples":[{"text":"```sqf\nif (typeOf vehicle player == \"B_Heli_Light_01_armed_F\") then { hint \"Player is in a AH-9 Pawnee\"; };\n```","code":["if (typeOf vehicle player == \"B_Heli_Light_01_armed_F\") then { hint \"Player is in a AH-9 Pawnee\"; };"]},{"text":"```sqf\n// Since 2.22\ntypeOf (findDisplay 313); // \"Display3DEN\"\n```","code":["// Since 2.22\ntypeOf (findDisplay 313); // \"Display3DEN\""]}],"multiplayer":null,"problems":null,"aliases":[],"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."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Operation Flashpoint version 1.90","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}