Jump to content

Recommended Posts

Hello, im trying to make a A-143 with jericho trumpets, so when diving it makes a sound. I have the following code so far, but I have trouble attaching the sound to the airplane. I know of say3D, however I don't think the volume can't be changed in that command, furthermore this script is supposed to be a composition so that it can be spawned on the fly in any mission. Any input is much appreciated!
 

this addWeaponTurret ["cannon_125mm_advanced",[-1]];
this addMagazineTurret ["24Rnd_125mm_APFSDS_T_Red",[-1]];
this addMagazineTurret ["24Rnd_125mm_APFSDS_T_Red",[-1]];

nul = [this] spawn {
	params ["_this"];
	while {alive _this} do { 
		_velocity = ((velocityModelSpace _this select 1) - 100) max 0; 
		_vol = _velocity / 10;
		playSound3D [
			"a3\sounds_f\sfx\alarm_blufor.wss",
			_this,
			false,
			_this,
			_vol,
			1,
			300
			]; 
		sleep 3; 
	};
};

 

Share this post


Link to post
Share on other sites

is your sound not playing at all?, or you can't attach it?, Im using my custom sound with this code and it seems to work but I noticed that even if you put 300m as a distance, I can only hear my custom sound around when I'm around 60m close to the object, this works for me:


[this] spawn {
	_object =_this select 0;
	
	while {alive _object} do {
		playSound3D 
		[
			getMissionPath "transfer_loot.ogg",  
			_object, 
			false, 
			_object, 
			1, 
			1, 
			300
		
		];
		sleep 0.5;
	};
};

 

 

Share this post


Link to post
Share on other sites

I have the same problem with the distance, but it fixed it when i put the distance up to like 1500. The problem is that it  it doesn't move with the plane, so after 0.5 seconds the airplane already moved 100m and the sound just plays from the same spot in the air

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
Sign in to follow this  

×