{"name":"getDiverState","operator":null,"title":"getDiverState","type":"command","url":"https://community.bistudio.com/wiki/getDiverState","revid":309148,"updated":"2022-05-03T14:10:04Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.96"}],"since":{"game":"arma3","name":"Arma 3","version":"1.96"},"arma3_since":"1.96","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns true when object is in diver state - e.g when the unit would put diving goggles on.\n\n> [!NOTE]\n> Diving goggles remove blurriness underwater, however when assigned, they do not appear on the face of the unit until the unit steps into the water.\n> This command allows to detect the moment when the goggles are visible.\n> If the unit doesn't have diving goggles assigned, this command would still return true at appropriate time if the unit steps into the water.","syntaxes":[{"syntax":"getDiverState unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true when diving goggles are visible","text":"Boolean - true when diving goggles are visible"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\nprivate _gogglesOn = getDiverState player;\n```","code":["private _gogglesOn = getDiverState player;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["goggles","removeGoggles","addGoggles"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 1.96","Scripting Commands"]}