{"name":"sizeOf","operator":null,"title":"sizeOf","type":"command","url":"https://community.bistudio.com/wiki/sizeOf","revid":349136,"updated":"2023-11-08T14:49:45Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.08"},{"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":"arma1","name":"Armed Assault","version":"1.08"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the diameter of bounding sphere of the object of given classname in meters. If you need to estimate the size of the object more precisely, use boundingBox or boundingBoxReal.\n\n> [!IMPORTANT]\n> At least one object of the given classname has to be present in the current mission otherwise zero will be returned.","syntaxes":[{"syntax":"sizeOf classname","since":null,"effect":null,"exec":null,"params":[{"name":"classname","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"classname: String"}],"returns":{"type":"Number","types":["Number"],"description":"size returned is usually bigger than the biggest size of the object along any of the axes. For example if object is 10 x 4 x 5 the sizeOf value returned expected to be around 10.","text":"Number - size returned is usually bigger than the biggest size of the object along any of the axes. For example if object is 10 x 4 x 5 the sizeOf value returned expected to be around 10."},"form":"unary","operator":null,"left":null,"right":{"text":"classname","types":["String"]}}],"examples":[{"text":"```sqf\n_dimension = sizeOf \"M1Abrams\"; // Returns 10.7833\n```","code":["_dimension = sizeOf \"M1Abrams\"; // Returns 10.7833"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["boundingBox","boundingBoxReal","boundingCenter"],"notes":[],"categories":["ArmA: Armed Assault: New Scripting Commands","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 Armed Assault version 1.08","Scripting Commands","Take On Helicopters: Scripting Commands"]}