Jump to content

Recommended Posts

This is a really simple script which reduces the ambient sounds.

 

********************************

Create a file called onPlayerRespawn.sqf (or use your existing one) and put the following code into it:

soundlvl=1;

 

Create a folder called scripts. Inside this folder create a file called earplugsPutIn.sqf and put the following code into it:

if (soundlvl isEqualto 1) or (soundlvl isEqualto 3) then {
	soundlvl=2;
	hintSilent "Sound at 20%";
	2 fadeSound .20;
	waitUntil {soundlvl != 2}
};

if (soundlvl isEqualto 2) then {
	soundlvl=3;
	hintSilent "Sound at 5%";
	2 fadeSound .05;
	waitUntil {soundlvl != 3}
};

Inside the folder scripts create a file called earplugsTakeOut.sqf and put the following code into it:

soundlvl=1;
hintSilent "Removed earplugs";
2 fadeSound 1;

 

Using the script: You can either use addaction or a keyhandler to execute the script. Every time you execute earplugsPutIn.sqf it will toggle the noise level between 5% and 20%. When you execute earplugsTakeOut.sqf the sound will be set back to normal.

 

If you have any questions or need help with your mission feel free to ask!

Cheers

Puffi

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×