Jump to content
  • 0

Format of multiple cfgsounds files in description


Hammer

Question

Title pretty much says it all. I have two Cfgsounds im trying to add in, how is it formatted so that they both work. Here's what I have....

class CfgSounds
{
    sounds[] = {siren};
    class siren
    {
	name = "siren";
	sound[] = {Scripts\sirens\siren.ogg,0.5,1};
	titles[] = {};
    };
	;
    sounds[] 
	= 
		{carLock
    };
    class carLock
    {
		name="carLock";
		sound[]={carlock.ogg,0.9,1};
		titles[] = {};
    };
};
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
class CfgSounds
{
	sounds[] = {};
	class wolf1
	{
		// how the sound is referred to in the editor (e.g. trigger effects)
		name = "my_wolf_sound1";
		// filename, volume, pitch
		sound[] = {"fx\wolf1.ogg", 1, 1};
		// subtitle delay in seconds, subtitle text 
		titles[] = {1, "*wolf growls*"};
	};
	class wolf2
	{
		// how the sound is referred to in the editor (e.g. trigger effects)
		name = "my_wolf_sound2";
		// filename, volume, pitch
		sound[] = {"fx\wolf2.ogg", 1, 1};
		// subtitle delay in seconds, subtitle text 
		titles[] = {1, "*wolf growls*"};
	};
};

Use with:

playSound "wolf1";   // use the class name!
player say ["wolf1", 100];

playSound "wolf2";   // use the class name!
player say ["wolf2", 100];
Link to comment
Share on other sites

  • 0

Sorry to resurrect an old topic but I can't seem to get this to work, this is what I've placed in my description.ext

 

class CfgSounds
{
 sounds[] = {};
 class newspawnsound
{
  name = "newspawnsound";
  sound[] = {sounds\new_spawn_sound.ogg, 1, 1};
  titles[] = {1, ""};
  };
};
 
I've placed the sound in a folder in the mission file as above sounds\new_spawn_sound.ogg and I've made a little script to play it when a player is at the new spawn location.
 
_location = [23600,18000,0];
 
if ((_location distance player) < 5) then {
_message;
playSound "new_spawn_sound";
};

 

I get an error on login that the sound couldn't be found, regardless if I'm in the trigger zone or not, I've followed every instruction I could find on the net to the letter and it still doesn't work. Anyone have any ideas?

Link to comment
Share on other sites

  • 0

 

Title pretty much says it all. I have two Cfgsounds im trying to add in, how is it formatted so that they both work. Here's what I have....

class CfgSounds
{
    sounds[] = {siren};
    class siren
    {
	name = "siren";
	sound[] = {Scripts\sirens\siren.ogg,0.5,1};
	titles[] = {};
    };
	;
    sounds[] 
	= 
		{carLock
    };
    class carLock
    {
		name="carLock";
		sound[]={carlock.ogg,0.9,1};
		titles[] = {};
    };
};

Hey to get more sounds to work the format is like this

 

 

class CfgSounds

{

    sounds[] =

    {

        carLock, z_wzombie1, z_wzombie2, siren

    };

    class carLock

    {

        name="carLock";

        sound[]={custom\carlock.ogg,0.9,1};

        titles[] = {};

    };

    class z_wzombie1 {

        name = "";

        sound[] = {"custom\walkamongstthedead\dayz_sfx\femalezombie_attack_04.ogg",0.3,1,40};

        titles[] = {0, ""};

    };

    class z_wzombie2 : z_wzombie1 {

        sound[] = {"custom\walkamongstthedead\dayz_sfx\femalezombie_spotted_01.ogg",0.3,1,40};

    };

    class siren

    {

        name = "siren";

        sound[] = {custom\siren.ogg,0.5,1};

        titles[] = {};

    };

};

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...