Barba-negra 117 Posted August 15, 2018 good afternoon everyone, greetings and a hug, I come here to ask for help please, I am currently using this command to deactivate the sound of a map environment, but when using it, it does so throughout the map, and I would like it just outside of a selected area or within a trigger, how could he do it? please help. this is the command enableEnvironment [false, false]; Share this post Link to post Share on other sites
Mr H. 402 Posted August 15, 2018 For SP you can just use it in a trigger and re enable on exit, for MP however it might be more complicated, it does not say on the wiki wether the effects are global or local. I'd put my money on global in which case it might not be possible but it's worth testing. Share this post Link to post Share on other sites
Barba-negra 117 Posted August 15, 2018 if it really works on the global, I've tried it on a dedicated server and if it removes all the ambient sound of the map, but I still do not know how it could cause only the sound to be deactivated in a specific area Share this post Link to post Share on other sites
bad benson 1733 Posted August 15, 2018 considering that even the ambient rabbits and snakes are local, there might be a chance the effects of the command are local tbh. i'd like to know this for sure too though. since i already use this exactly like the OP tries to inside a large building with a trigger but i never cosnidered it could be global effect. Share this post Link to post Share on other sites
Barba-negra 117 Posted August 15, 2018 I have used this scripts but nevertheless it is still deactivating the sound of the whole map trigger name Trignuevo Ac: sounddeactivated = enableEnvironment [false, false] inAreaArray Trignuevo; Share this post Link to post Share on other sites
Harzach 2517 Posted August 15, 2018 Is this for singleplayer? If so, a trigger should work fine: Name your trigger (I'll use "EnvToggle_01") Activation: Player Present Repeatable Condition: player inArea EnvToggle_01 OnAct: enableEnvironment [true, false]; //leave wildlife but remove sound, change to [false, false] to remove everything OnDeact: enableEnvironment [true, true]; Any time the player is in the trigger, the environment will deactivate. When the player leaves the trigger, the environment reactivates. 1 Share this post Link to post Share on other sites
Harzach 2517 Posted August 15, 2018 Also, since environmental wildlife is local, I would guess that sounds are as well, so it might work in MP...? 1 Share this post Link to post Share on other sites
Barba-negra 117 Posted August 15, 2018 hello hello, I was off the pc, it's multiplayer Harzarch, what did you write then it would only be for one player? Share this post Link to post Share on other sites
Barba-negra 117 Posted August 15, 2018 Is your script very complete, could it serve as a multiplayer? Share this post Link to post Share on other sites
Barba-negra 117 Posted August 15, 2018 Well I just tried it and it works eliminates the ambience when you are inside the trigger, but it is necessary that the ambience continue for players who are out of the trigger, is that possible? Share this post Link to post Share on other sites
Barba-negra 117 Posted August 15, 2018 maybe you see something like that ??? [enableEnvironment [False, false]] inAreaArray EnvToggle_01; Share this post Link to post Share on other sites
Mr H. 402 Posted August 15, 2018 what you have to check is if the command is executed only on the machine that calls the command or if it's executed on all machines. To do that just ask a pal to join you on the server and run the command in the console (by clicking on local of course) if the sounds stop for you and not for your pal it means the command has effects local to the machine and then what you want to do can be easily done, if not however it might not be possible. 2 Share this post Link to post Share on other sites
Harzach 2517 Posted August 15, 2018 2 hours ago, elthefrank said: maybe you see something like that ??? [enableEnvironment [False, false]] inAreaArray EnvToggle_01; Well, no. enableEnvironment works in a specific way, you can't change that by mixing it with other commands like inAreaArray. Do as @Mr H. suggested above. Share this post Link to post Share on other sites
Larrow 2822 Posted August 16, 2018 Its EL, updated wiki page. Just place down a trigger and leave its options as default, do nothing but change its position and size and give it a name. //initPlayerLocal.sqf waitUntil{ !isNil "BIS_fnc_init" && time > 0 }; _trigger = trg; if ( player inArea _trigger ) then { enableEnvironment[ true, false ]; }; _trigger triggerAttachVehicle [ player ]; _trigger setTriggerActivation [ "VEHICLE", "PRESENT", true ]; _trigger setTriggerStatements ["this", " enableEnvironment[ true, false ] ", " enableEnvironment[ true, true ] "]; Replace trg on the second line of code with what ever name you gave the trigger. Test SP, MP hosted and dedicated and JIP. TEST_MISSION 3 3 Share this post Link to post Share on other sites
Barba-negra 117 Posted August 16, 2018 Ohh excellent friend thank you very much good: D Share this post Link to post Share on other sites
Harzach 2517 Posted August 16, 2018 Awesome, thanks @Larrow! Share this post Link to post Share on other sites
Barba-negra 117 Posted August 16, 2018 I just tried the work @Larrow this manignifico, really thank you very much :-D 1 Share this post Link to post Share on other sites