I just spent a gazillion hours trying to figure the same thing out. If I understand you correctly, you want to have a sound play from a single spot or unit in the game, so as you run to it, it gets louder, and as you run away, it gets quieter. I wanted a radio on a table to have a "turn on" action added, and then play music using the "say" command.
Here's what I did when I figured it out:
To make a compatible sound file, make it the same as you would a music file EXCEPT!!!!!- make it mono instead of stereo. Otherwise, it may not work at all, or it may sound really slow and deep in pitch. Now, put the sound in your OFP/USER/MISSIONS/MISSIONNAME/SOUND folder.
Now in your mission, place the object/game logic/whatever that you want to "say" the sound and name it.
Alt Tab out, open your missions description file if you have it, if not, make a new file using notepad and type:
class CfgSounds
{
sounds[]= {personal};
class personal
{
name="personal";
sound[]={"\sounds\personal.ogg", db-10,1.0};
titles[]={};
};
};
The tabs don't matter too much, but the punctuation does. This is for of course, the name of my sound is "personal", so fill in your sound name where that is. If you want words to pop up, use the lines after "titles" to pull from your stringtable, but I won't get into that. Use db-10, 1.0 to change the decibles and the pitch respectively.
This file shoud be named description.ext
Now, back to the editor. You can make the sound play a number of ways. I've used two so far.
Trigger: Just make a trigger with your desired conditions, with the activation 'unit say "sound"'
Script: I just did this to practice, since I suck at editing. I made a script with several units saying several sounds at various intervals. I called the script by setting a variable to true with a trigger. I guess this is still a trigger activated method though.
Anyhow, the point is, that your unit should "say" the sound file now. You can use this for moving vehicles blaring music, radios playing music, people talking. . . you know!
I hope this helped. I would actually feel really good if I could help anyone with OFP. I've been using scripts and tuts so long, I feel I owe the community something! Problem is I can't do much!
Later,
Ghillisniper_270