Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
kelgram

Playing a sound so only one side can hear it?

Recommended Posts

Currently I am playing sounds when BLUFOR shoot an enemy , where they say something like "Got him" or "Tango down".

The only problem is that anyone else whether they are friendly or enemy on the map can hear it, even if they are miles away. Is there any way I can restrict communication of the sound to one side?

if (side _killer isEqualTo WEST) then
{

_sound = ["tangodown1","tangodown2","tangodown3"] call BIS_fnc_selectRandom;
_message = ["Got him", "Tango down" , "Threat neutralized", "Hostile down"] call BIS_fnc_selectRandom;
_killer sideRadio "T"; //not working
playSound _sound; //everyone can hear this even if they are 5km away

};

Share this post


Link to post
Share on other sites

Use playSound3D.

And for the sideRadio issue, maybe it's supposed to be _message instead of "T"?

And to make it easy to display for just one side I recommend executing this with BIS_fnc_MP via something like this (fill in your info):

[[[script params],"someScript.sqf"],"BIS_fnc_execVM",WEST,false,false] call BIS_fnc_MP;

Share this post


Link to post
Share on other sites

You should not use playSound3D because it has a global effect. Use say or say3D

---------- Post added at 17:33 ---------- Previous post was at 17:25 ----------

Also, for your sideRadio command, you need to add a class to your description.ext:

class CfgRadio
{
sounds[] = {};
class T
{
	name = "";
	sound[] = {};
	title = "This will work now";
};
};

Share this post


Link to post
Share on other sites
Sign in to follow this  

×