{"name":"enableEnvironment","title":"enableEnvironment","type":"command","url":"https://community.bistudio.com/wiki/enableEnvironment","revid":349663,"updated":"2023-11-18T17:02:32Z","groups":["Environment","Sounds"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"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\n- bird sounds\n- insect sounds\n- waves\n- wind\n- rain\n- sounds produced by air conditioners and similar\n\n- Arma 3 v2.06 thunder (an already started sound will not be cut but future ones will be prevented)","syntaxes":[{"syntax":"enableEnvironment enable","params":[{"name":"enable","type":"Boolean","description":"false to disable ambient life and ambient sounds, true to re-enable it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}},{"syntax":"enableEnvironment [ambientLife, ambientSound, windyCoef]","since":"arma3 1.68","params":[{"name":"ambientLife","type":"Boolean","description":"enable/disable ambient life (bees, rabbits, birds, snakes, fish)","type_expr":"Boolean"},{"name":"ambientSound","type":"Boolean","description":"enable/disable ambient sounds (cicadas, owls, etc)","type_expr":"Boolean"},{"name":"windyCoef","type":"Number","optional":true,"default":"1","description":"howling wind at heights, range 0..1","type_expr":"Number","since":"arma3 2.12","text":"windyCoef: Number - (Optional, default 1) howling wind at heights, range 0..1"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[ambientLife, ambientSound, windyCoef]"}}],"examples":[{"code":["enableEnvironment false; // identical to enableEnvironment [false, false]"]},{"code":["enableEnvironment [false, true];\nenableEnvironment [false, true, 0.5]; // since Arma 3 v2.12"]}],"see_also":["environmentEnabled","fadeEnvironment","environmentVolume","initAmbientLife","sideAmbientLife","getAllEnvSoundControllers","getEnvSoundController","setSoundEffect","Arma 3: Animals: Ambient System"]}