Home   Help Search Login Register  

Author Topic: Placing custom sounds as/in objects  (Read 1131 times)

0 Members and 1 Guest are viewing this topic.

Offline Pergite

  • Members
  • *
Placing custom sounds as/in objects
« on: 05 Sep 2007, 16:53:14 »
Hi!

I have been lurking this site and forum for ages, of course in awe of all creativity displayed for OFP. With ArmA I decided to finally try to do some serious missions myself. To highten the immersion factor for my latest project I started to add alot of custom sounds. Background radio chatter while on the insertion helo, as well as the distinctive data transmission sound for a certain military radio every time the player gets a text message from its HQ.
This works well and the sounds are placed as triggers, or withe the "playsound" command in the helo.

I however cant make my sounds function like the sounds that are under the object menu in the editor, namely that they are played relative to the players position. I for example want to create a tent with voices inside, and allow the player to move around it for the stereo/surround sound effect that all "sound" objects creates.

I have looked all over the web for two days now but not found anything that works. I am using the Arma Editor by Chris Hendersson to add my soundfiles into the description.ext :

Quote
class CfgSounds
{
   // List of sounds (.ogg files without the .ogg extension)
   sounds[] = {andvt};

   // Definition for each sound
   class andvt
   {
      name = "andvt";
      sound[] = {\sound\andvt.ogg, db + 0, 1.0};
      titles[] = {0, ""};

      
   };
};

Any help would be apreciated!

Offline Cheetah

  • Former Staff
  • ****
Re: Placing custom sounds as/in objects
« Reply #1 on: 05 Sep 2007, 22:56:35 »
Hey welcome to OFPEC Pergite! Haven't seen you before around here.

As you you noticed, you can use triggers to make the sound come from a certain position. It will make it audible wel nearby, but harder to hear when 100m from the trigger. You can do the same with objects, however, you need to use a command to make it work.

You may have made a soldier talk before? If not, one uses say to make it work.

The same command can be used to make tents talk! Making it audible only (decent volume) when nearby. How?

Check the attached mission, or use the following code:

Code: [Select]
tent say "andvt";

where tent is the name of the tent, and "andvt" is the voice you want to be played.

Good luck!
« Last Edit: 20 Aug 2009, 16:16:30 by hoz »
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Pergite

  • Members
  • *
Re: Placing custom sounds as/in objects
« Reply #2 on: 06 Sep 2007, 21:19:32 »
Thank you for the help and a great site! :good:

I had allready tried what you said, but then the sound appeared to be global, heard everywhere. I then fiddled with the dB value in the description file, and I guess that what was the problem, that the sound was too loud.

I am looking forward to post some missions here when I am ready, and not too ashamed of them.  :whistle: