Jump to content

computermancer

Recommended Posts

cmEarplugs 2.0 is now available on github!

 

Earplugs script for Arma 3 Epoch (EPAH safe)
 
- This script allows you to put in "earplugs".
- Config.sqf will let you configure almost every possible aspect of the script.
- You can now insert and remove the earplugs by pressing a key of your choice. 
- Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE
- Auto-insert and remove earplugs when getting in and out of vehicles.
- Inserting earplugs reduces volume down to about 25 percent.
- Removing earplugs restores volume to 100 percent.
 
 
*Thanks to mgm on epochmod.com for helping with keypress config technique.
 
EDIT: I didn't have any battleye kicks, let me know if you get any so I can update BE filters.
Link to comment
Share on other sites

 

cmEarplugs 2.0 is now available on github!

 

Earplugs script for Arma 3 Epoch (EPAH safe)
 
- This script allows you to put in "earplugs".
- Config.sqf will let you configure almost every possible aspect of the script.
- You can now insert and remove the earplugs by pressing a key of your choice. 
- Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE
- Auto-insert and remove earplugs when getting in and out of vehicles.
- Inserting earplugs reduces volume down to about 25 percent.
- Removing earplugs restores volume to 100 percent.
 
 
*Thanks to mgm on epochmod.com for helping with keypress config technique.
 
EDIT: I didn't have any battleye kicks, let me know if you get any so I can update BE filters.

 

Congrats on the new release!

 

A small suggestion on the documentation side:  if you move the bottom 2 lines to top, to line positions #2 & #3 script intro will be fullin 3 lines, one ofter another easy to follow, as such:

 
- This script allows you to put in "earplugs".
- Inserting earplugs reduces volume down to about 25 percent.
- Removing earplugs restores volume to 100 percent.

You keep improving this non-stop! Looking forward to v.3.0 with luxury earplugs that keep vehicle noise out like the previous versions but can also pair up with your Apple Watch (the new 32 zettabytes, 2036 model!) and keep playing music at 100% volume level.

 

Good job cm, keep it up!

Link to comment
Share on other sites

Guys,

I suggested KeyDown because it was consistently working for me, cm gave credit and used this more elegant solution. That would be the end of it if this was vanilla Arma. However EPOCH evidently changes things.

As soon as I moved my Transport for Arma script to production (with the initial public alpha release) started receiving reports of "it's not working" from testers. I have done my homework (after the event) and set up a clean lab and done tests in a systematic way. In summary, keyDown works only when EPAH is enabled AND player is an admin.

 

I don't know if this KeyDown method which myself and CM use can be 'fixed' in Epoch. What I do know is, until someone shows us how, we need a temp workaround.

 

Last night, I have implemented which does not rely on keyPress but 'activates' when map is opened three times in rapid succession (3 times in 8 seconds by default). Admittedly opening/closing map is a bit ugly method but for the time being, in the absence of anything better, it is doing the job.

 

Working fine when Epoch AntiHack is on or off,

working fine when local player is admin or not,

working fine when AH cfgpatches setting enabled or not etc etc.

 

It is easy enough to code mapDetect from scratch but I will be happy to share the code if CM would like to re-use my existing code.

Link to comment
Share on other sites

From what I hear KeyUp works fine.

When I noticed the issue with EPOCH_KeyDown (i.e.: not working), changing all KeyDown's to KeyUp was the first step in my test process, lasted about 5 minutes and did not work for me.

 

If anybody shares working code I will be happy to test & use.

 

I imagine EPOCH_KeyDown is not there to outright 'block' all KeyDown events, we just need to speak its language somehow but I have no idea how it works hence the workaround. We need LordAWOL or axeman or someone similar.

 

(of course they are all busy developing hoverboards now)

Link to comment
Share on other sites

I also add !="KeyDown" to a couple of lines in scripts.txt.  This was to fix BE error 59 kick when AI kills you.

 

added !="KeyDown" to:

displayAddEventHandler

displayRemoveEventhandler

 

Also added !="cmEarplugs_hotkeyDIKCodeNumber"  as mentioned by computermancer above.

 

All sorted I hope

Link to comment
Share on other sites

I updated battleye stuff, files on github and install instrucitons

BTW: It turns out that EPAH being enabled does not allow keydown stuff. 

But if you do have EPAH enabled, everything else still works.

 

Edit these in your BE filters

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
scripts.txt (at the end of the line add the following)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                        
(BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"      
                
 (displayAddEventHandler)  Line 53 (54 on notepad++) :         !"EP_LOOP"
 (displayAddEventHandler)  Line 53 (54 on notepad++)           !"cmKeyPress"
 (              exec                    )   Line 22 (23 on notepad++) :           !"clock.sqf"
 
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
PublicVariable.txt (at the end of the line add the following)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber"
 
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Link to comment
Share on other sites

I updated battleye stuff, files on github and install instrucitons

BTW: It turns out that EPAH being enabled does not allow keydown stuff. 

But if you do have EPAH enabled, everything else still works.

 

Edit these in your BE filters

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

scripts.txt (at the end of the line add the following)

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                        

(BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"      

                

 (displayAddEventHandler)  Line 53 (54 on notepad++) :         !"EP_LOOP"

 (displayAddEventHandler)  Line 53 (54 on notepad++)           !"cmKeyPress"

 (              exec                    )   Line 22 (23 on notepad++) :           !"clock.sqf"

 

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

PublicVariable.txt (at the end of the line add the following)

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber"

 

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

In my experience EPAH is blocking for players and working for admins - sorry I noticed this after suggesting the method.

I got a workaround which is working for all players if you'd like to reuse that method let me know?

Link to comment
Share on other sites

Hey Guys,

 

I'm getting the following when I die after implementing this script. Any ideas?

I've added the !="KeyDown" as described in a previous post, but that hasn't helped:

 

Script restriction #31.

 

The log says: #31 "PlayerKilled.sqf"

 

5 fadeSound 1;

earplugsout = true;

removeAllActions inCaseofDeath;

removeAllActions theOneTrueName;

inCaseo"

 

Paul

Link to comment
Share on other sites

Hey Guys,

 

I'm getting the following when I die after implementing this script. Any ideas?

I've added the !="KeyDown" as described in a previous post, but that hasn't helped:

 

Script restriction #31.

 

The log says: #31 "PlayerKilled.sqf"

 

5 fadeSound 1;

earplugsout = true;

removeAllActions inCaseofDeath;

removeAllActions theOneTrueName;

inCaseo"

 

Paul

Is EPAH (Epoch AntiHack) enabled and if yes, are you an EPAH Admin? Evidently, only EPAH admins can use this 'KeyDown' and EPAH need to be enabled on the server.
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
×
×
  • Create New...