Had to grin a bit when I read the reply.
I just forgot that "say" also works with objects. At some point I tend to get lost while editing.
Still, there is a problem for me making this work good.
UNN provided me some code for eventhandler and script and I embedded it but it sounds not really satisfying.
I do not know what is wrong particularely, maybe it´s Arma sound engine that makes it sound stupid, maybe it´s a flaw in the code.
I call the emitter script with this eventhandler from init of d30 gun:
this AddEventHandler ["Fired",{[_This Select 0, NearestObject [_This Select 0,_This Select 4]] ExecVM "arisound.sqs"}]
The arisound.sqs looks like this:
_Gun= _This Select 0;
_Round= _This Select 1;
//Length of the sound sample in seconds
_SoundDuration=2;
WaitUntil
{
_Round Say "arifly";
Sleep _SoundDuration;
!(Alive _Round)
};
I actually had to put the volume of the sound very high to be hearable at all. It´s about +50 db now.
But it plays somehow wrong. It sounds like it´s speed up and I do not get the feeling of a projectile flying over my head. There´s also a gap of half a second before the projectile detonates where it´s totally silent, although the sound is definately longer than the time it take for the projectile to fly.
I´m a bit confused on the bad results.