{"name":"getDiverState","title":"getDiverState","type":"command","url":"https://community.bistudio.com/wiki/getDiverState","revid":309148,"updated":"2022-05-03T14:10:04Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","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>\n> This command allows to detect the moment when the goggles are visible.\n>\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","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when diving goggles are visible"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _gogglesOn = getDiverState player;"]}],"see_also":["goggles","removeGoggles","addGoggles"]}