Angrygargamel Posted December 30, 2014 Report Share Posted December 30, 2014 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 mgm and Home Sweet Home 2 Link to comment Share on other sites More sharing options...
0 computermancer Posted February 8, 2015 Report Share Posted February 8, 2015 Is there a way so when a vehicle is near you you can put in ear plugs? I hate it when your trying to talk to someone and there is a chopper next to you and you cant hear a thing. Yeah, I am working on the next version of it which will allow you to put them in from inside and outside the car, and will auto remove them 10 seconds after getting out of a vehicle in case that vehicle blows up or w/e :) Link to comment Share on other sites More sharing options...
0 computermancer Posted February 9, 2015 Report Share Posted February 9, 2015 Done! Now you can use earplugs inside and outside, and when you get out of a vehicle , they come out in about 5 seconds. https://www.dropbox.com/s/cen58l133nvt3pc/SFM_VEH_EP_3.rar?dl=0 http://youtu.be/zeMpObHdM74 ChrisJohnson 1 Link to comment Share on other sites More sharing options...
0 Sporny Posted February 9, 2015 Report Share Posted February 9, 2015 Dont work fine..... after every respawn i got another "earplug" point in the menu.... so 4 death= earplugs 4 times in scroll menu :( computermancer 1 Link to comment Share on other sites More sharing options...
0 jox Posted February 9, 2015 Report Share Posted February 9, 2015 yeah same here computermancer 1 Link to comment Share on other sites More sharing options...
0 DirtySanchez Posted February 9, 2015 Report Share Posted February 9, 2015 He just needs to insert his remove add action to the end of the line.. He has given us some nice stuff here guys be patient as he works out the little kinks. computermancer 1 Link to comment Share on other sites More sharing options...
0 computermancer Posted February 9, 2015 Report Share Posted February 9, 2015 Sorry guys, used a bad methodology on that one. I fixed it now, so the script adds the Earplugs to every vehicle when you load in, rather than when you respawn. So now you can die and respawn with only one iteration of the addaction. Also, if you leave the server and re-connect, it still only shows one. Hopefully no more earplug spam. :P I updated the link above, and the link below. https://www.dropbox.com/s/cen58l133nvt3pc/SFM_VEH_EP_3.rar?dl=0 mgm 1 Link to comment Share on other sites More sharing options...
0 DirtySanchez Posted February 9, 2015 Report Share Posted February 9, 2015 Thanks for the update Link to comment Share on other sites More sharing options...
0 Calaveylon Posted February 12, 2015 Report Share Posted February 12, 2015 Sorry guys, used a bad methodology on that one. I fixed it now, so the script adds the Earplugs to every vehicle when you load in, rather than when you respawn. So now you can die and respawn with only one iteration of the addaction. Also, if you leave the server and re-connect, it still only shows one. Hopefully no more earplug spam. :P I updated the link above, and the link below. https://www.dropbox.com/s/cen58l133nvt3pc/SFM_VEH_EP_3.rar?dl=0 a lot of files here some of which say what to change and others leave me guessing. explanation would be great maybe make your own topic or a video. computermancer 1 Link to comment Share on other sites More sharing options...
0 computermancer Posted February 12, 2015 Report Share Posted February 12, 2015 a lot of files here some of which say what to change and others leave me guessing. explanation would be great maybe make your own topic or a video. I am learning how to use github, when I am done, I will make a repository for it and other stuff I am working on. :wacko: You're right, I did kinda just throw it all in there. :ph34r: I also put in a request for my own topic, but it's still pending approval. :rolleyes: Calaveylon 1 Link to comment Share on other sites More sharing options...
0 second_coming Posted February 12, 2015 Report Share Posted February 12, 2015 The beauty of all this is everyone is learning from each other, good work guys :) Link to comment Share on other sites More sharing options...
0 computermancer Posted February 12, 2015 Report Share Posted February 12, 2015 Oh yeah, github is awesome, but takes a bit to get used to it. Here you go, instructions and everything. :D https://github.com/computermancer/SFM_VEH_EP_3 Link to comment Share on other sites More sharing options...
0 5nine Posted February 12, 2015 Report Share Posted February 12, 2015 awesome addition computermancer. Works like a charm. however, as it is added to any vehicle you also get it in some of the traders as those objects are also "vehicles". I believe it would be better to implement an array of allowed vehicles. Link to comment Share on other sites More sharing options...
0 Calaveylon Posted February 13, 2015 Report Share Posted February 13, 2015 Oh yeah, github is awesome, but takes a bit to get used to it. Here you go, instructions and everything. :D https://github.com/computermancer/SFM_VEH_EP_3 Great Stuff, thank you Link to comment Share on other sites More sharing options...
0 computermancer Posted February 13, 2015 Report Share Posted February 13, 2015 awesome addition computermancer. Works like a charm. however, as it is added to any vehicle you also get it in some of the traders as those objects are also "vehicles". I believe it would be better to implement an array of allowed vehicles. Haha, didn't notice that, yeah, I had a method that used an array, probably will go back it to to be more specific. I though I could get away from it by making it a bit more general, but it may a bit TOO general, lol. Why do people still use "sleep" in scripts? It's out of date, it should be "uiSleep" https://community.bistudio.com/wiki/uiSleep "uiSleep is basically using the system time (uiTime more specifically) and not simulation time. So in the cases where sleep command would get stuck indefinitely, uiSleep can still be used to effectively delay script execution." I have no issues with old-school sleep command, I only use uisleep for very specific situations, none of these really call for it. Not sure if this script has it, but for onPlayerRespawn.sqf, I do use uisleep because of the fact that it is usually happening for the first spawn during the mission briefing, after that point, it doesn't matter,... but I still consider myself a novice, so I could be totally wrong. :P Honestly, I don't even need that uisleep in my opr because of the fact that I have my script waiting for the player to move before his opr scripts are run. Any other info you may have on UISLEEP would be greatly appreciated though, ;) Link to comment Share on other sites More sharing options...
0 ulli_123 Posted February 13, 2015 Report Share Posted February 13, 2015 It can be revived no player more since I've script on it. Link to comment Share on other sites More sharing options...
0 cheech420now Posted February 14, 2015 Report Share Posted February 14, 2015 Don't work on choppers? When i tested this it wouldnt work on choppers. Link to comment Share on other sites More sharing options...
0 mgm Posted February 14, 2015 Report Share Posted February 14, 2015 Sorry guys, used a bad methodology on that one. I fixed it now, so the script adds the Earplugs to every vehicle when you load in, rather than when you respawn. So now you can die and respawn with only one iteration of the addaction. Also, if you leave the server and re-connect, it still only shows one. Hopefully no more earplug spam. :P I updated the link above, and the link below. https://www.dropbox.com/s/cen58l133nvt3pc/SFM_VEH_EP_3.rar?dl=0 Hi, a couple of things: good script, I like it - thanks! there is a bug, in your git hub, in file "cm_veh_init.sqf", the last character is a . (dot) which causes errors. I removed it, script started working fine. you might want to fix that. [EDIT: Just FYI, error is "error in expression [] spawn cm_Veh_Loop; hint "done;.> error position: <.>"] I suggest for the next update (if it's gonna happen) you rename the script file and directory to 'earplugs' or something like that - it's just a small cosmetic improvement really. EDIT: "...you got out of a car..." text would be better with "...you got out of a vehicle" because it says car even when you actually leave a heli [haven't tested but I guess sea vehicles would have the same cosmetic issue]. EDIT: so I was going to work (looting) in my kart, our new shiny earplugs mousewheel option was nowhere to be found. perhaps add more vehicles? :) Link to comment Share on other sites More sharing options...
0 Calaveylon Posted February 14, 2015 Report Share Posted February 14, 2015 Hi, a couple of things: good script, I like it - thanks! there is a bug, in your git hub, in file "cm_veh_init.sqf", the last character is a . (dot) which causes errors. I removed it, script started working fine. you might want to fix that. [EDIT: Just FYI, error is "error in expression [] spawn cm_Veh_Loop; hint "done;.> error position: <.>"] I suggest for the next update (if it's gonna happen) you rename the script file and directory to 'earplugs' or something like that - it's just a small cosmetic improvement really. EDIT: "...you got out of a car..." text would be better with "...you got out of a vehicle" because it says car even when you actually leave a heli [haven't tested but I guess sea vehicles would have the same cosmetic issue]. EDIT: so I was going to work (looting) in my kart, our new shiny earplugs mousewheel option was nowhere to be found. perhaps add more vehicles? :) Good catch Link to comment Share on other sites More sharing options...
0 computermancer Posted February 14, 2015 Report Share Posted February 14, 2015 Thanks for catching that horrible type-O. I will be fixing those issues today. I will be adding an array of allowed vehicles, I will be adding a loop to constantly check for new vehicles that may show up after being bought from trader. I believe that's why some vehicles won't have the earplugs applied. I will post the updated version later today when I am satisfied with the changes. mgm 1 Link to comment Share on other sites More sharing options...
0 fresh229 Posted February 15, 2015 Report Share Posted February 15, 2015 Here you go dude, I finished testing it out earlier today. Copy this to your onPlayerRespawn.sqf file in your root mission folder. (if you don't have it, create it. waituntil {!isnull (finddisplay 46)}; private ["_hintTitle","_hintText","_hintInfo","_hintOut","_cm_die","_guydude","_cmtrig","_cmbreathing","_cm_startingpos","_cm_position","_cm_stationary"]; _cmbreathing = alive player; _cmtrig=true; _guydude = player; while {_cmtrig} do { sleep 0.5; if (_cmbreathing) then { _cm_startingpos = position player; sleep 0.5; _cm_position = position _guydude; _cm_stationary = _cm_startingpos select 0 == _cm_position select 0 && _cm_startingpos select 1 == _cm_position select 1; if (_cm_stationary) then { hint "Spawned in... Standing around..."; } else { hint "Starting up scripts..."; _cmtrig=false; }; }; }; UISLEEP 5; [] execVM "earplugs.sqf"; And copy this code to your earplugs.sqf file in your root folder. (if you don't have it, make it) //created by computermancer //Inspitration for code structure came from // v1g Fast Rope by [STELS]Zealot //========================================================================================= //=== Awesome Earplugs Scripts================================== //---by computermancer----- superfunserver.com------------------ #define CM_ADD_TITLE1 "Earplugs" earplugsout=true; // the vehicles in which you can addAction cm_allowed_array = ["O_Heli_Light_02_unarmed_F","O_Heli_Light_02_F","B_Heli_Transport_01_F","B_Heli_Transport_01_camo_F","O_Heli_Attack_02_F","O_Heli_Attack_02_black_F","I_Heli_Transport_02_F","B_Heli_Light_01_F","C_Offroad_01_EPOCH","C_Quadbike_01_EPOCH","C_Hatchback_01_EPOCH","C_Hatchback_02_EPOCH","C_SUV_01_EPOCH","C_Rubberboat_EPOCH","C_Rubberboat_02_EPOCH","C_Rubberboat_03_EPOCH","C_Rubberboat_04_EPOCH","C_Van_01_box_EPOCH","C_Van_01_transport_EPOCH","C_Boat_Civil_01_EPOCH","C_Boat_Civil_01_police_EPOCH","C_Boat_Civil_01_rescue_EPOCH","B_Heli_Light_01_EPOCH","B_SDV_01_EPOCH","B_MRAP_01_EPOCH","B_Truck_01_transport_EPOCH","B_Truck_01_covered_EPOCH","B_Truck_01_mover_EPOCH","B_Truck_01_box_EPOCH","O_Truck_02_covered_EPOCH","O_Truck_02_transport_EPOCH","O_Truck_03_covered_EPOCH","O_Truck_02_box_EPOCH","I_Heli_light_03_unarmed_EPOCH","O_Heli_Light_02_unarmed_EPOCH","I_Heli_Transport_02_EPOCH","O_Heli_Transport_04_EPOCH","O_Heli_Transport_04_bench_EPOCH","O_Heli_Transport_04_box_EPOCH","O_Heli_Transport_04_covered_EPOCH","B_Heli_Transport_03_unarmed_EPOCH","jetski_epoch","K01","K02","K03","K04","ebike_epoch","mosquito_epoch"]; cm_addaction_req = { private ["_veh","_cm_req"]; _veh = vehicle player; _cm_req = (_veh != player) and { (typeof _veh) in cm_allowed_array } and {alive _veh}; _cm_req; }; cm_FUNc_earplugs = { if (earplugsout) then { hint "Earplugs have been put in."; 1 fadeSound 0.25; earplugsout=false; } else { hint "Earplugs have been taken out."; 1 fadeSound 1; earplugsout=true; }; }; player addAction["<t color='#00ffff'>"+CM_ADD_TITLE1+"</t>", cm_FUNc_earplugs, [], -1, false, false, '','[] call cm_addaction_req']; cutText [format["You can now wear earplugs when in certain vehicles."], "PLAIN DOWN",1]; As for battle eye filters, just add this to your scripts.txt file. Look for the "execvm" line and at the end of it, add this... !="finddisplay" !="onPlayerRespawn.sqf" !="earplugs.sqf" should look something like this 7 exec !="<execute expression=" !"RscDebugConsole_execute" !"execFSM" !"_executeStackedEventHandler" !"fn_execVM" !"fn_moduleExecute" !"fn_execRemote" !"fn_MPexec" !"bis_fnc_moduleExecute_activate" !"fn_tridentExecute" !"randomize_civ1" !"executed from" !"EPOCH_DebugGUI_exec" !"_handle = [_display] execVM _script;" !"execVM \"\A3\Structures_F\scripts" !="execVM \"\A3\Structures_F_EPC\Civ\PlayGround\scripts\Carousel_spin.sqf\"" !="HC\init.sqf" !="aoa\DCL\init.sqf;" !="IgiLoad" !="R3F_ARTY_AND_LOG" !="HC" !="FuMs" !="NameTags" !="SFM" !="superfun" !="randomize_colors" !="clock.sqf" !="randomize_gue" !="finddisplay" !="onPlayerRespawn.sqf" !="earplugs.sqf" This is working for me, but sometimes players does not have the selection of the Earplugs o.O (Vehicle is whitelist) Link to comment Share on other sites More sharing options...
0 mgm Posted February 16, 2015 Report Share Posted February 16, 2015 Hi, a couple of things: good script, I like it - thanks! there is a bug, in your git hub, in file "cm_veh_init.sqf", the last character is a . (dot) which causes errors. I removed it, script started working fine. you might want to fix that. [EDIT: Just FYI, error is "error in expression [] spawn cm_Veh_Loop; hint "done;.> error position: <.>"] I suggest for the next update (if it's gonna happen) you rename the script file and directory to 'earplugs' or something like that - it's just a small cosmetic improvement really. EDIT: "...you got out of a car..." text would be better with "...you got out of a vehicle" because it says car even when you actually leave a heli [haven't tested but I guess sea vehicles would have the same cosmetic issue]. EDIT: so I was going to work (looting) in my kart, our new shiny earplugs mousewheel option was nowhere to be found. perhaps add more vehicles? :) 6. "Automatically remove earplugs when you leave a vehicle" is a nice feature - saving us an unnecessary mouse wheel action every time. Likewise, "automatically put on earplugs" should exist I think - this too will save us from the unnecessary action. It's novelty and fun to use mousewheel to turn volume down first 100 times or so, then it's just tiring. This is something BI should have added to the vanilla game as engine sound is inconveniently high. Link to comment Share on other sites More sharing options...
0 computermancer Posted February 16, 2015 Report Share Posted February 16, 2015 6. "Automatically remove earplugs when you leave a vehicle" is a nice feature - saving us an unnecessary mouse wheel action every time. Likewise, "automatically put on earplugs" should exist I think - this too will save us from the unnecessary action. It's novelty and fun to use mousewheel to turn volume down first 100 times or so, then it's just tiring. This is something BI should have added to the vanilla game as engine sound is inconveniently high. BI already has their solution, they want you to use Ctrl + and Ctrl - I would add an auto-put-in-earplugs action, but it might annoy people who don't need or want sound reduction. The purpose of this script is to give players an extra option in sound reduction that requires no keyboard interaction or esc-menu-access. Latest version should be updated today with many improvements. Thanks for the feedback :D Link to comment Share on other sites More sharing options...
0 computermancer Posted February 17, 2015 Report Share Posted February 17, 2015 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. mgm 1 Link to comment Share on other sites More sharing options...
0 mgm Posted February 17, 2015 Report Share Posted February 17, 2015 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. a.The typo (.) bug has been fixed in this version b.Script directory has been renamed to clarify functionality c."You got out of car" text has been fixed to apply to all types of vehicles d.Karts can now use earplugs! yay! ^^ All good improvements, thanks for continuous effort on this baby! Here is my suggestions on this new release since you've been receptive to comments as per above: For any future work on this (on any script really) a single central ChangeLog file in the package would be very helpful to save us all time... EDIT: here is a good example of ChangeLog implementation... I have installed this; I can't see it but just to be sure I will ask please can you advise - "automatically put earplugs on" functionality doesn't seem to be in, has it been implemented? Any chance to add it later on? BI's solution don't really solve the problem, your script does. If it does this with less effort all the better! thanks again. computermancer 1 Link to comment Share on other sites More sharing options...
0 computermancer Posted February 17, 2015 Report Share Posted February 17, 2015 a.The typo (.) bug has been fixed in this version b.Script directory has been renamed to clarify functionality c."You got out of car" text has been fixed to apply to all types of vehicles d.Karts can now use earplugs! yay! ^^ All good improvements, thanks for continuous effort on this baby! Here is my suggestions on this new release since you've been receptive to comments as per above: For any future work on this (on any script really) a single central ChangeLog file in the package would be very helpful to save us all time... EDIT: here is a good example of ChangeLog implementation... I have installed this; I can't see it but just to be sure I will ask please can you advise - "automatically put earplugs on" functionality doesn't seem to be in, has it been implemented? Any chance to add it later on? BI's solution don't really solve the problem, your script does. If it does this with less effort all the better! thanks again. There is no "automatically put earplugs on" functionality. I wanted to give people the option, sometimes we dont get in vehicles to turn them on... I am bad at documentation. :P But will work on it. Thanks for the tips. I can see about adding a toggle for auto-remove and auto-wear earplugs. This way script users can have a choice. What I really want is a nearestObject type trigger so earplugs come out if no vehicles are within 25m. Thats the dream. :P I am very receptive to suggestion for improvements as well as any other future scripts. (currently working on radio script, and salvage script) Thanks for all the positive feedback! EgoBoooooost enabled! :D mgm 1 Link to comment Share on other sites More sharing options...
Question
Angrygargamel
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
Top Posters For This Question
40
14
8
8
Popular Days
Dec 30
16
Jan 30
15
Feb 4
10
Jan 1
10
Top Posters For This Question
computermancer 40 posts
ulli_123 14 posts
mgm 8 posts
Talib 8 posts
Popular Days
Dec 30 2014
16 posts
Jan 30 2015
15 posts
Feb 4 2015
10 posts
Jan 1 2015
10 posts
Popular Posts
vbawol
You can simply use the internal sound volume system we added CTRL and - or +
RIE_JACKTE(new)
all well and good untill you accidental scroll too far on the action menu and click eject
Scoo
I had this problem with another script, (alive vehicle player) seems to trigger when player is still in loading. Try to change the "Sleep 8" to a bigger number, this could help... Sure you
174 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now