Jump to content
Sign in to follow this  
Nephris1

(pre)loading "incoming" shell sound

Recommended Posts

Hi friends,

Bis is doing a great job refering to their beta patches and some fixes to bugs i even didnt notice.

But some objective features didnt reach their attention yet, like the incoming sound for artillery shells (i know the rockets have incoming sound).

So how is it possible to (pre)load sound for artilery shells?

I guess this is possible only for artillery outside the BIS module, means a scripted artillery.

Do i have to check the distance to its explosion point and load then the sound at e.g. _shell distance _expPlace < 10 or sth like that?

I also treid to change the script used in EW i think

artystrike = [] spawn {
for "_i" from 0 to 10 do {
	for "_n" from 0 to 100 do {
		_missile = "M_Maverick_AT" createvehicle [
			(position artillery select 0) - 300 + random 600,
			(position artillery select 1) - 300 + random 600,
			500
		];
		_missile setdir 90;
		[_missile,-70,0] call bis_fnc_setpitchbank;
		_missile setvelocity [0,0,-444];

		_missile spawn {
			waituntil {isnull _this};
			_dis = rah1 distance artillery;
			if (random 1 < (200 / _dis)) then {
				_sounds = if (rah1 distance artillery < 400) then {["explosion_1","explosion_2"]} else {["explosionsmall_1","explosionsmall_2"]};
				_sound = _sounds call bis_fnc_selectrandom;
				playsound _sound;
			};
		};

		sleep ((0.1 + random 0.2));
	};
	sleep 10;
};
}; 

Although the sound here refers to a detonation sound, i think we could lower the distance and replace an incoming sound.

However the script works with missiles only.

I am by far not skilled enough and am just able by try & error to get to a result.

So my aim was to get an incoming shell sound loaded before a shell hits the ground and detonates.

Share this post


Link to post
Share on other sites

Some "issues":

1) Vanilla shells doesn't seem to have flySound defined. Not for shells. Not for flares. Try a sound addon for the easiest fix. Not sure if it was vopsound, JSRS, or Eliassound that had some close to decent sounds.

2) flySound is particularly hard to do due to the double doppler effect you'll end up with. Which is why I don't like to have them defined at all and rather fake it.

3) Your script uses playsound. Means you won't get a directional cue. I prefer creating HeliHEmpty objects to play the sound at impact/burst location.

4) The script uses a faked approach (createVehicle rather than the actual shot shells). So all you need to do is create a _dummy = "HeliHEmpty" createVehicle ..... object near the impact zone and use _dummy say "incomingsound".

Btw, I prefer the faked approach as it gives me far more options to work with than actual shot shells.

Share this post


Link to post
Share on other sites

I'd love to have shells that were configured with proper flySound definitions. The problem is getting a sound effect that is not doppler shifted. As CG alluded to, unless the sound effect was recorded/generated from a location that is moving along with the shell the changes in pitch will fight with the sound engine in A2. The resulting modulation is extremely ugly.

Rockets have samples that are clean this way, so do some jet engines. Perhaps pitch-bending or some minor filtering of one of those might work.

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  

×