{"name":"setOxygenRemaining","operator":null,"title":"setOxygenRemaining","type":"command","url":"https://community.bistudio.com/wiki/setOxygenRemaining","revid":377982,"updated":"2026-01-20T14:37:17Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Sets oxygen remaining. It has no effect when soldier is not diving.","syntaxes":[{"syntax":"unit setOxygenRemaining value","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"},{"name":"value","type":"Number in range 0..1","optional":false,"default":null,"description":null,"types":["Number"],"since":null,"text":"value: Number in range 0..1"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object"]},"right":{"text":"value","types":["Number"]}}],"examples":[{"text":"```sqf\nif (!isAbleToBreathe player) then\n{\n    player setOxygenRemaining 0; // drowns player\n};\n```","code":["if (!isAbleToBreathe player) then\n{\n\tplayer setOxygenRemaining 0; // drowns player\n};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["isAbleToBreathe","getOxygenRemaining"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 0.50","Scripting Commands"]}