Jump to content
  • 0

Earplugs for vehicles...


Angrygargamel

Question

Hi&Hello...

i tried to implement this little but functional earplug script on my epoch server...

i have tried 3 different variants now... but the mousewheel actions never show up

 

http://www.armaholic.com/page.php?id=26624

 

any suggestions?

 

 

who doesnt know what this script does...

when you fly in a heli you cant understand anything of the VON or teamspeak unless you turn the ingame volume down

this script does this for you instant... put the earplugs in... sound is lowered to x percent

take the earplugs out... sound is back to normal

Link to comment
Share on other sites

Recommended Posts

  • 0

Wait a minute, so you're saying that the solutions people have presented so far are ridiculous and you want to be lazy and not actually invest any time in fixing it for yourself but you want the devs to code in a whole other mod just so you can adjust the sounds for vehicles?!

 

Yes I was serious, if you're a gamer that uses VOIP software buy a decent fucking headset or suck it up princess.

Link to comment
Share on other sites

  • 0

Wait a minute, so you're saying that the solutions people have presented so far are ridiculous and you want to be lazy and not actually invest any time in fixing it for yourself but you want the devs to code in a whole other mod just so you can adjust the sounds for vehicles?!

 

Yes I was serious, if you're a gamer that uses VOIP software buy a decent fucking headset or suck it up princess.

Doesn't account for in-game channels, which was one of his concerns, and it was brought up for a second time.  From what I understand, CTRL +/- dampens all the sounds, not just effects, correct?  Or am I wrong?  I rarely use it, I'm used to jumping into settings and turning it down.

 

all well and good untill you accidental scroll too far on the action menu and click eject

Word.

Link to comment
Share on other sites

  • 0

Wait a minute, so you're saying that the solutions people have presented so far are ridiculous and you want to be lazy and not actually invest any time in fixing it for yourself but you want the devs to code in a whole other mod just so you can adjust the sounds for vehicles?!

 

Yes I was serious, if you're a gamer that uses VOIP software buy a decent fucking headset or suck it up princess.

why should i fix something what the devs broke up when they block other code than their own?

 

 

all well and good untill you accidental scroll too far on the action menu and click eject

never happened to me... but i guess you can also place it on a shortcut on a keypress ^^

 

 

Use autovolume for ts3 works well

autovolume for TS3 does nothing when it comes to INGAME VOICECHAT.... which isnt lowered when the rest of the soundeffects is lowered with the earplugs...

 

your turn ^^

Link to comment
Share on other sites

  • 0

played on a Altis Life server that had CNTRL + [ & ] to enable and disable.  Worked well.

 

I like the idea of lower it slightly (epoch method) but in my opinion that's clumsy.  There should be a ear plugs on and off key.

 

Anyway, i tried running the script and it doesnt work.  It's not a battleye issue - it just doesnt come up as a player menu option.

 

I'll try binding a key and see what happens.

Link to comment
Share on other sites

  • 0

My player base would like to see earplugs as well they dislike the CTRL way and wish to have more options available to them 

 

 

These where found in arma 3 subjects and i only gotten 1 to work do far for a short time when i turned on server again it went away

 

if you know how to get any of these to work that be great to share =)

 

player addAction["Earplugs On/Off",{if (soundVolume != 1) then {1 fadeSound 1;} else {1 fadeSound 0.4;};},"",-6,false,false,"",'vehicle player != player || soundVolume != 1']];

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

actionStatus = false;
player addAction ["Ear Plugs", {
    if (!actionStatus) then {
        hint "You have Put ear plugs in";
1 fadeSound 0.1;
        (_this select 0) setUserActionText [(_this select 2), "Ear Plugs In"];
    }else{
        hint "You have taken the ear plugs out";
0.1 fadeSound 1;
        (_this select 0) setUserActionText [(_this select 2), "Ear Plugs In"];
    };
    actionStatus = !actionStatus;
},[],1,true,true,"",""];  

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

private["_handled", "_faceCP", "_faceVP"];
_key = _this select 1;
_shift = _this select 2;
_handled = false;
if(!alive player) exitWith {
    _handled
};
switch _key do
{
    case 2:
{
if (soundVolume <= 0.5) then
{
0.1 fadeSound 1;
["You've taken out your ear plugs.",4] call mf_notify_client;
} else {
0.1 fadeSound 0.1;
["You've inserted your ear plugs.",4] call mf_notify_client;
};
};
        _handled;

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

init.sqf 

player addaction ["Put on ear plugs","scripts\earplugs.sqf"];

simpleEP.sqf

_u = _this select 0;
_p = ["<t color='#ffff33'>Put on ear plugs</t>",{
_s = _this select 0;
_i = _this select 2;
if (soundVolume != 1) then {
1 fadeSound 1;
_s setUserActionText [_i,"<t color='#ffff33'>Put on ear plugs</t>"];
} else {
1 fadeSound 0.4;
_s setUserActionText [_i,"<t color='#ffff33'>Take off ear plugs</t>"];
}
},[],-90,false,true,"","_target == vehicle player"];
_u addAction _p;
_u addEventHandler ["Respawn",{
1 fadeSound 1;
(_this select 0) addAction _p;
}];

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

This one uses a key to toggle it

// Ear Plugs - End Key
case (_key == 207):
{
if (soundVolume <= 0.5) then
{
0.5 fadeSound 1;
["You've taken out your ear plugs.",4] call mf_notify_client;
} else {
0.5 fadeSound 0.1;
["You've inserted your ear plugs.",4] call mf_notify_client;
};
};

Non of these are my work,

 

So hope someone can help =) 

 

for anyone who says its not needed, they don't want it, its game breaking... no one is forcing you to use it but there are some out there who would like to have something like this.

Link to comment
Share on other sites

  • 0

what does this have to do with the topic?

 

he is saying it should be quiet in the heli.

 

I would like to see an upgrade where you can find material to sound deaden the inside of the heli so you are a) forced to farm for it, b) it takes up space and c) you have to fly inside the heli for the noise to drop.

Link to comment
Share on other sites

  • 0

Heya, i got something working.

First you have to create a new file in your mpmission root folder and name it initplayerlocal.sqf.

while {true} do {
	waitUntil {alive vehicle player};
	Sleep 8;
	[] execVM "custom\earplugs.sqf";
	waitUntil {!alive player};
	[] execVM "custom\earplugs.sqf";
};

then create earplugs.sqf in a custom folder or wherever you like:

if(isNil "EarPlugsOn") then {EarPlugsOn = true;} else {EarPlugsOn = !EarPlugsOn};
ToggleEarPlugs = {
	if (soundVolume != 1) then {
		1 fadeSound 1;
		cutText ['Ear plugs taken off', 'PLAIN'];
	} else {
		1 fadeSound 0.2;
		cutText ['Ear plugs put on', 'PLAIN'];
	};
};
if(EarPlugsOn) then { 
	Press_F3 = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 61) then {call ToggleEarPlugs;};"];
};
if(!EarPlugsOn) then {
	(findDisplay 46) displayRemoveEventHandler ["KeyDown", Press_F3];
};

However there is a chance you have to set up battleye filters to get it to work.

Link to comment
Share on other sites

  • 0

Heya, i got something working.

First you have to create a new file in your mpmission root folder and name it initplayerlocal.sqf.

while {true} do {
	waitUntil {alive vehicle player};
	Sleep 8;
	[] execVM "custom\earplugs.sqf";
	waitUntil {!alive player};
	[] execVM "custom\earplugs.sqf";
};

then create earplugs.sqf in a custom folder or wherever you like:

if(isNil "EarPlugsOn") then {EarPlugsOn = true;} else {EarPlugsOn = !EarPlugsOn};
ToggleEarPlugs = {
	if (soundVolume != 1) then {
		1 fadeSound 1;
		cutText ['Ear plugs taken off', 'PLAIN'];
	} else {
		1 fadeSound 0.2;
		cutText ['Ear plugs put on', 'PLAIN'];
	};
};
if(EarPlugsOn) then { 
	Press_F3 = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 61) then {call ToggleEarPlugs;};"];
};
if(!EarPlugsOn) then {
	(findDisplay 46) displayRemoveEventHandler ["KeyDown", Press_F3];
};

However there is a chance you have to set up battleye filters to get it to work.

 

is initplayerlocal.sqf. being called from your init.sqf like so?

[] execVM "initplayerlocal.sqf";
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...