Home   Help Search Login Register  

Author Topic: Global sound definitions  (Read 1405 times)

0 Members and 1 Guest are viewing this topic.

Rubble_Maker

  • Guest
Global sound definitions
« on: 08 Nov 2002, 20:07:03 »
Hi

is it possible to define a sound in an addon class and play it from a script?


CAT_SHIT_ONE_MM

  • Guest
Re:Global sound definitions
« Reply #1 on: 09 Nov 2002, 15:28:10 »
Well I don't know if you could play sounds from scripts becaz I don't use them but yes, it is possible to make a sound addon.  I mean you could make sound classes and make it into a .pbo file then also add an environment sound class.

An example .cpp is below.

class CfgPatches
{
   class CATDuststorm1
   {
      units[]={CATDuststorm1};
   };
   
};

class CfgSounds
{
   class CATODFfightoffenemy
   {
      name="CATODFfightoffenemy";   
      sound[]   ={"\catODFsound\CATODFfightoffenemy.wav",0.0300000,1.000000};
      titles[]={};
   };
};
class CfgRadio
{
   sounds[] =
        {
      CATODFnovember1caution,
      CATODFcalifornia3requesthelp,
      CATODFcalifornia3requesthelpreply,
      CATODFcalifornia3requestagain
   };
        class CATODFnovember1caution
        {
             name = "CATODFnovember1caution";
             sound[] = {"\CATODFSound\CATODFnovember1caution.wav", 0.05, 1.0};
             title=;
        };
        class CATODFcalifornia3requesthelp
        {
             name = "CATODFcalifornia3requesthelp";
             sound[] = {"\CATODFSound\CATODFcalifornia3requesthelp.wav", 0.05, 1.0};
             title=;
        };
        class CATODFcalifornia3requesthelpreply
        {
             name = "CATODFcalifornia3requesthelpreply";
             sound[] = {"\CATODFSound\CATODFcalifornia3requesthelpreply.wav", 0.05, 1.0};
             title=;
        };
        class CATODFcalifornia3requestagain
        {
             name = "CATODFcalifornia3requestagain";
             sound[] = {"\CATODFSound\CATODFcalifornia3requestagain.wav", 0.05, 1.0};
             title=;
        };
};

For the environment sounds below.

class CfgEnvSounds
{
   access=1
   class CATGREnvBOMBHILL1
   {
      name="CATGREnvBOMBHILL1";
      sound[]={"\catIntro\CATGREnvBOMBHILL1.wav",40,1};
      soundNight[]={"\catIntro\CATGREnvBOMBHILL1.wav",40,1};
   };
   class CATGREnvBOMBHILL2
   {
      name="CATGREnvBOMBHILL2";
      sound[]={"\catIntro\CATGREnvBOMBHILL2.wav",30,1};
      soundNight[]={"\catIntro\CATGREnvBOMBHILL2.wav",30,1};
   };
};

I did this to my afghan map and now it has a new more realistic warzone env sound with bomb blowing up from distance away in the mountain.

Rubble_Maker

  • Guest
Re:Global sound definitions
« Reply #2 on: 09 Nov 2002, 17:20:16 »
Cool thx I'll check that out.

I was wondering if maybe the description.ext stuff is basically just the same as the config.cpp "language", i.e. all classes you define in descr.ext could be in config.cpp too.