Jump to content
Aurora152

3D sound played on moving vehicle

Recommended Posts

Hello All,

 

I am trying to get a sound playing from a Humvee with this:

_null = [] spawn {for "_i" from 1 to 999 do {        
playSound3D [getMissionPath "" + "sound\radiochatter.ogg", humvee1, false, getPosASL humvee1, 5, 1, 20];        
sleep 60;        
};        
};  

And it works perfectly for a stationary object.

 

Is there a way to make this work for a moving vehicle?

 

TIA,

Aurora 

Share this post


Link to post
Share on other sites

@beno_83au I'm confused as to which I would need to remove? 

I've tried:

_null = [] spawn {for "_i" from 1 to 999 do {        
playSound3D [getMissionPath "" + "sound\radiochatter.ogg", [], false, getPosASL humvee1, 5, 1, 20];        
sleep 60;        
};        
}; 

It didn't work.

I have also tried:

_null = [] spawn {for "_i" from 1 to 999 do {        
playSound3D [getMissionPath "" + "sound\radiochatter.ogg", humvee1, false, [0,0,0], 5, 1, 20];        
sleep 60;        
};        
};   

And that didn't work either...

Share this post


Link to post
Share on other sites

I have been playing around with that, but I need it to be global so everyone can hear it... 

I have tried this:

[humvee1, ["radiochatter", 1, 1]] remoteExec ["say3D", ([0, -2] select isDedicated), false];

In an attempt to make it global, however it isn't working...

Share this post


Link to post
Share on other sites

Might be your maxDistance value, but just try:

[humvee1,"radiochatter"] remoteExec.....

Share this post


Link to post
Share on other sites

@beno_83au Unfortunately, that didn't work...

[humvee1, "radiochatter"] remoteExec ["say3D", ([0, -2] select isDedicated), false];

@major-stiffy This didn't either...

[humvee1, ["radiochatter", 100, 1]] remoteExec ["say3D"];

 

Share this post


Link to post
Share on other sites

This in description.ext ?

class CfgSounds {
	sounds[] = {};
	class radiochatter {
		name="radiochatter";
		sound[]={sounds\radiochatter.ogg, 20, 1, 20}; // filename, volume, pitch, distance
		titles[] = {};
	};	

the ogg file is in a folder called sounds.

  • Like 1

Share this post


Link to post
Share on other sites

Yeah, i've got the CfgSounds in the description. I have other stuff in there, but the radiochatter is at the bottom.

class CfgSounds
{
	class uragan_1
	{
		name = "uragan_1";
		sound[] = {"\sound\uragan_1.ogg", db+5, 1};
		titles[] = {1, ""};
	};
	class bcg_wind
	{
		name = "bcg_wind";
		sound[] = {"\sound\bcg_wind.ogg", db+5, 1};
		titles[] = {1, ""};
	};	
	class rafala_1
	{
		name = "rafala_1";
		sound[] = {"\sound\rafala_1.ogg", db+10, 1};
		titles[] = {1, ""};
	};	
	class rafala_4_dr
	{
		name = "rafala_4_dr";
		sound[] = {"\sound\rafala_4_dr.ogg", db+1, 1};
		titles[] = {1, ""};
	};	
	class rafala_5_st
	{
		name = "rafala_5_st";
		sound[] = {"\sound\rafala_5_st.ogg", db+1, 1};
		titles[] = {1, ""};
	};
	class sandstorm
	{
		name = "sandstorm";
		sound[] = {"\sound\sandstorm.ogg", db+10, 1};
		titles[] = {1, ""};
	};
	class radiochatter
	{
		name = "radiochatter";
		sound[] = {"sound\radiochatter.ogg", dB+5, 1, 15};
		titles[] = {1, ""};
	};
};

 

Share this post


Link to post
Share on other sites

I suggest you try it exactly as I have it because it works perfectly for me.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×