{"name":"enableEnvironment","operator":null,"title":"enableEnvironment","type":"command","url":"https://community.bistudio.com/wiki/enableEnvironment","revid":349663,"updated":"2023-11-18T17:02:32Z","groups":["Environment","Sounds"],"status":"ok","replaced_by":[],"games":[{"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":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":null,"description":"Enable/disable environmental effects: ambient life and/or ambient sound.\n\n> [!NOTE]\n> This command has to be executed after mission start: be sure to use e.g `sleep 0.1;` for it to take effect.\n\nInfluenced sounds among others are:\n- bird sounds\n- insect sounds\n- waves\n- wind\n- rain\n- sounds produced by air conditioners and similar\n- Arma 3 v2.06 thunder (an already started sound will not be cut but future ones will be prevented)","syntaxes":[{"syntax":"enableEnvironment enable","since":null,"effect":null,"exec":null,"params":[{"name":"enable","type":"Boolean","optional":false,"default":null,"description":"false to disable ambient life and ambient sounds, true to re-enable it","types":["Boolean"],"since":null,"text":"enable: Boolean - false to disable ambient life and ambient sounds, true to re-enable it"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"enable","types":["Boolean"]}},{"syntax":"enableEnvironment [ambientLife, ambientSound, windyCoef]","since":"arma3 1.68","effect":null,"exec":null,"params":[{"name":"ambientLife","type":"Boolean","optional":false,"default":null,"description":"enable/disable ambient life (bees, rabbits, birds, snakes, fish)","types":["Boolean"],"since":null,"text":"ambientLife: Boolean - enable/disable ambient life (bees, rabbits, birds, snakes, fish)"},{"name":"ambientSound","type":"Boolean","optional":false,"default":null,"description":"enable/disable ambient sounds (cicadas, owls, etc)","types":["Boolean"],"since":null,"text":"ambientSound: Boolean - enable/disable ambient sounds (cicadas, owls, etc)"},{"name":"windyCoef","type":"Number","optional":true,"default":"1","description":"howling wind at heights, range 0..1","types":["Number"],"since":"arma3 2.12","text":"windyCoef: Number - (Optional, default 1) howling wind at heights, range 0..1"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"[ambientLife, ambientSound, windyCoef]","types":["Array"]}}],"examples":[{"text":"```sqf\nenableEnvironment false; // identical to enableEnvironment [false, false]\n```","code":["enableEnvironment false; // identical to enableEnvironment [false, false]"]},{"text":"```sqf\nenableEnvironment [false, true];\nenableEnvironment [false, true, 0.5]; // since Arma 3 v2.12\n```","code":["enableEnvironment [false, true];\nenableEnvironment [false, true, 0.5]; // since Arma 3 v2.12"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["environmentEnabled","fadeEnvironment","environmentVolume","initAmbientLife","sideAmbientLife","getAllEnvSoundControllers","getEnvSoundController","setSoundEffect","Arma 3: Animals: Ambient System"],"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: Environment","Command Group: Sounds","Introduced with Armed Assault version 1.00","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}