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

Okie Dokie. Here is a link to my latest version of the earplugs script. WIth instructions, and BE filters.  :D

 

https://github.com/computermancer/cmEarplugs

 

Updated this baby with some sweet sweet new techniques. Only things missing is an auto-remove triggered by distance to nearest vehicle.

 

 

 

Still wont work for helicopters.

Link to comment
Share on other sites

  • 0

Are the helicopters in your server from the default Epoch list or did you add your own? If you added your own, you have to add them to the aloowedArray. But it should just pop up if you get in the chopper. Hmmm.... is anyone else having this issue? 

 

I will setup a vanilla test server and spawn in a heli to test...

Link to comment
Share on other sites

  • 0

Okay you guys, I have made the grand daddy of all my earplugs scripts. :D

 

It has toggles for auto remove and auto insert of earplugs. By default it will auto-insert earplugs, and auto-remove them when getting in/out of vehicles. :wub:

 

It no longer depends on an array, so it's IMPOSSIBLE to not have them once you have entered a vehicle once. :ph34r:

 

Same link. https://github.com/computermancer/cmEarplugs

Link to comment
Share on other sites

  • 0

Okay you guys, I have made the grand daddy of all my earplugs scripts. :D

 

It has toggles for auto remove and auto insert of earplugs. By default it will auto-insert earplugs, and auto-remove them when getting in/out of vehicles. :wub:

 

It no longer depends on an array, so it's IMPOSSIBLE to not have them once you have entered a vehicle once. :ph34r:

 

Same link. https://github.com/computermancer/cmEarplugs

Cool, I will try soonest!

 

I came here now from Altis to post a suggestion for the next version:

if there are multiple vehicles parked next to each other 'earplugs' menu appear more than once - perhaps add a constraint so that it never shows up more than once in the mouse wheel menu?

Link to comment
Share on other sites

  • 0

Cool, I will try soonest!

 

I came here now from Altis to post a suggestion for the next version:

if there are multiple vehicles parked next to each other 'earplugs' menu appear more than once - perhaps add a constraint so that it never shows up more than once in the mouse wheel menu?

In the new version. I am REALLY bad at documentation... sorry. :P

Link to comment
Share on other sites

  • 0

Could you make a simple earplug script where the option to put them in is up all the time instead of just around vehicles?

 

Yes, but that will trigger the Epoch AntiHack.

 

Until they allow us to exempt "addaction" from triggering the filter, we have to use this work around.

 

If you addaction to a player, it will do an autoban, no way to stop that yet. (without disabling the Epoch AntiHack)

 

This script I wrote is as simple as I can make it without using the "player addaction" command.

 

Theoretically, you can add the action to EVERYTHING on the server, but not sure how annoying that would be.  :P

 

My next attempt is to use the nearestObject command to trigger the action, but I am still a novice.

Link to comment
Share on other sites

  • 0

In the new version. I am REALLY bad at documentation... sorry. :P

Cool, thanks.

BTW this thread started as a request by another person and progressed to becoming your release thread.

It might be a good idea for you to start your own thread now to share your work so that you can control the 1st post and the thread title, plus it'd be easier to find for others.

Link to comment
Share on other sites

  • 0

Okie Dokie. Here is a link to my latest version of the earplugs script. WIth instructions, and BE filters.  :D

 

https://github.com/computermancer/cmEarplugs

 

Updated this baby with some sweet sweet new techniques. Only things missing is an auto-remove triggered by distance to nearest vehicle.

I've upgraded to the latest version, working great! thanks for adding all these features!

Link to comment
Share on other sites

  • 0

BI just needs to do something imo. I think it would be practical enough. I could understand it being a problem with land vehicles since you could easily hear ground troops locations, but you're not going to hear anything in a helicopter anyways.

Like I said, future would have sound dampening technology, just sayin.

I'll see if anyone else has been pushing it on BI when I get home I guess.

Link to comment
Share on other sites

  • 0

 

The basic script for earplugs i'm using doesn't require an "addaction", if you want to give a try:

 

You only need earplugs.sqf (root of your mpmission folder):

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];
};

and initplayerlocal.sqf, in your mpsission root aswell:

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

then don't forget to add filters to scripts.txt in your battleye folder:

 

(add this at the end of line 53: displayAddEventHandler)

!"Press_F3 = (findDisplay 46) displayAddEventHandler [\"KeyDown\",\"if ((_this select 1) == 61) then {call T"

(add this at the end of line 59: displayRemoveEventHandler)

!"(findDisplay 46) displayRemoveEventHandler [\"KeyDown\", Press_F3];"

Works great Scoo.. And I don't have to disable the Default AH. Thank you very much.

Link to comment
Share on other sites

  • 0

Works great Scoo.. And I don't have to disable the Default AH. Thank you very much.

 

Hello Caveman1,  I just implemented the same thing and believe there is something blocking my use of the F3 key.  I have confirmed the script loads and I can call "ToggleEarPlugs" manually from the debug console. 

I tried mapping F3 to switch to handgun, and it does not work for that either.   Did you encounter the same issue and just remap to a different key or is yours working as intended on F3?

 

I am using the EpochAH, no other addons or mods.

 

Thanks,

 

Korwiin

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



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