OFPEC Forum

Addons & Mods Depot => Arma2 - Configs & Scripting => Topic started by: DMarkwick on 21 Aug 2009, 14:28:53

Title: Config sounds, Say command, and using loud noises.
Post by: DMarkwick on 21 Aug 2009, 14:28:53
OK, so for the forest fire part of the new addon I'm making, I'd like for the fire to make a selection of noises. I'd like to either:
Have the custom object repeatedly Say the noise or
have the object loop the noise (or a selection of noises) via config until it's deleted.

In the config I have the object:
Code: [Select]
class firemarkerinv : DMViewBlock4Vis
 {
  displayName="firemarker (invisible)";
  model="\JTD_FireAndSmoke\firemarkerinv.p3d";
 };

and the sound:
Code: [Select]
class CfgSounds
{
 sounds[] = {};   
  class forestfiresound1
  {
   name = "ForestFireSound1";
   sound[] = {"\JTD_FireAndSmoke\Sounds\ForestFireSound1.ogg", 1, 1};
   titles[] = {};
  };
};

So, two questions I guess.
1. How do I add sounds to an object and get it to loop those sounds.
2. What sound parameters do I need to have a loud noise audible over say 200m?
Title: Re: Config sounds, Say command, and using loud noises.
Post by: nominesine on 21 Aug 2009, 15:03:21
I don't know much about addons, but when you are using sounds in a regular mission you can now define the distance over wich each and every sound can be heard. The volume will gradually fade away until maximum distance is reached. Even if you set the decibel to +90 or other rediculously high levels. In order to make a sound thtat should be heard at 200 meters I would say you need to set it's maximum distance to 300 or more (it's very weak and barely audible after 200 meters). Unfortunately I have no idea how sounds are defined within an addon. Do they have an internal description.ext or some similar equivalent?
Title: Re: Config sounds, Say command, and using loud noises.
Post by: DeanosBeano on 21 Aug 2009, 16:02:48
  the best way if its possible (i.e you dont have too many in close proximity) would be to emulate the original fires .

 
Code: [Select]
class Land_Fire : House
    {
      model = "\Ca\misc3\fire";
      displayName = "Fireplace";
      icon = "\ca\misc3\data\Icons\icon_fireplace_ca.paa";
      mapSize = 1;
      scope = 2;
      armor = 150;
      simulation = "fire";
      vehicleClass = "Misc";
      class effects : SmallFire
      {
        class Light1
        {
          simulation = "light";
          type = "SmallFireLight";
        };
        class sound
        {
          simulation = "sound";
          type = "Fire";
        };
        class Fire1
        {
          simulation = "particles";
          type = "SmallFireF";
        };
        class Smoke1
        {
          simulation = "particles";
          type = "SmallFireS";
        };
      };
    };

 the sound is defined elsewhere

   class Fire
    {
      name = "Fire";
      sound[] = {
        "\ca\Sounds\sfx\fire",
        0.316228,
        1
      };
      titles[] = {
      };
    };

 as afr as i am aware the first number ( sometimes there can be 3) is decibels , this determines how far the sound can be heard from the source and the second is the speed or pitch * the original .

 i know Mark from hifi could answer this better but if he dont show up iwill ask him to come take a look.

Title: Re: Config sounds, Say command, and using loud noises.
Post by: DMarkwick on 23 Aug 2009, 22:38:42
Thanks DB :)
Title: Re: Config sounds, Say command, and using loud noises.
Post by: scud on 25 Nov 2009, 22:42:01
What does the '90' represent in this case ?
example:
soundVehiclePlate1[] = {"ca\sounds\weapons\hits\hit_vehicle_plate_01", 0.562341, 1, 90};

My problem is the hit sounds are too quiet and I need to increase the volume.
Is this possible via cfg or do I have to rerecord the sound with an increased volume?


Title: Re: Config sounds, Say command, and using loud noises.
Post by: DeanosBeano on 26 Nov 2009, 00:09:30

 well i can give you my best guess , i never saw any Bis documentation for a2 ( like all thing i think we must wait till after A:o for official info ;) makes good buisness sense to me) .

 soundVehiclePlate1[] = {"ca\sounds\weapons\hits\hit_vehicle_plate_01", 0.562341, 1, 90};
                             
first is volume  or DB of the original recording 1 is as recorded your value is 0.5 so half original

second  is pitch or speed

 third ( guess)  the distance from impact that the sound will be heard Max ( or distance at which some fuziness/fade is applied) i say the last because shells have a last figure of 1800 and the sound is different  although 1800 may not mean make fuzzy like i said , it may simply be the max distance it will be heard from source.


Title: Re: Config sounds, Say command, and using loud noises.
Post by: scud on 26 Nov 2009, 03:22:07
Ok, my misunderstanding, I thought the db was the distance the sound carried and not necessarily the same as volume.
More experimenting and cross referencing.

thanks