edbusana 10 Posted February 8, 2015 (edited) I'm script to make a sound when a player (MP) is dead. Probelam that the player can be on the other side of the map that the sound is still heard. What would be the way to fix this problem by setting so that the sound was heard only in 50 meters or sound can also be only the dead player description.ext class CfgSounds { sounds[] = {Vent,Vent2,Para,Dead}; class Vent {name="Vent";sound[]={ATM_airdrop\data\Vent.ogg,db-11,1.0};titles[] = {};}; class Vent2 {name="Vent2";sound[]={ATM_airdrop\data\Vent2.ogg,db-11,1.0};titles[] = {};}; class Para {name="Para";sound[]={ATM_airdrop\data\parachute.ogg,db-11,1.0};titles[] = {};}; class Dead {name="Dead";sound[]={sounds\dead.ogg,db-11,1.0};titles[] = {};}; }; Init player: this addMPEventHandler ["MPKilled",{_this execVM "deathScript.sqf"}]; deathScript.sqf playSound "Dead"; Edited February 8, 2015 by edbusana Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 8, 2015 add if (!local (_this select 0)) exitWith {}; before playSound "Dead"; Share this post Link to post Share on other sites
edbusana 10 Posted February 8, 2015 add if (!local (_this select 0)) exitWith {}; before playSound "Dead"; added to the file deathScript.sqf but the sound is not output. I tested the preview editor and new server host if (!local (_this select 0)) exitWith {}; before playSound "Dead"; Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 9, 2015 Remove "before" Share this post Link to post Share on other sites
edbusana 10 Posted February 9, 2015 Remove "before" he sound is working again. The sound was not the problem in work, in fact I wanted to limit only to the dead player or very next players. What is happening is that if a player dies at 5km away another player hears the sound also. Share this post Link to post Share on other sites
austin_medic 109 Posted February 9, 2015 he sound is working again.The sound was not the problem in work, in fact I wanted to limit only to the dead player or very next players. What is happening is that if a player dies at 5km away another player hears the sound also. if (!local (_this select 0) || _this select 0 distance player > 20) exitWith {}; should work. Share this post Link to post Share on other sites
edbusana 10 Posted February 10, 2015 if (!local (_this select 0) || _this select 0 distance player > 20) exitWith {}; should work. Well, it worked. That's what I was looking for. Thx austin_medic Share this post Link to post Share on other sites
L3TUC3 32 Posted February 12, 2015 Take a look here as well: http://forums.bistudio.com/showthread.php?180776-Wilhelm-Scream Share this post Link to post Share on other sites
mindstorm 8 Posted February 12, 2015 First of all you need to make sure your sound is mono, not stereo. Then I add an logic to the object and make it use say3d. _deadPlayer = _this select 0; _object = "Logic" createVehicleLocal [0,0,0]; _object attachTo [_deadPlayer ,[0,0,1.5]]; _object say3D "yoursound"; [_object] spawn { sleep 2; deleteVehicle (_this select 0); }; Share this post Link to post Share on other sites
edbusana 10 Posted February 12, 2015 I am austin_medic the script working. Became the mono sound to stereo. If necessary revert the audio. Now I see the link L3TUC3 and test the script. Share this post Link to post Share on other sites