Jump to content

Troubles With Custom Sounds


Recommended Posts

Hi I have some Problems with this script

           
        class CfgMusic
{   
 tracks[]={};
 
 class music1
        {
        name = "music1";
        sound[] = {"media\music\1.ogg", db+0, 1.0};
        };

 

It's Working on a sencond Mission but not on co60_AW_Invade_Annex_2_82D.Altis Version OF Invade&Annex For Some Reason

 

in the co60_AW_Invade_Annex_2_82D.Altis description.ext it looks like that [its a part of description.ext]

 


class Params
};
       {
        class AO {
                title = "Enable Main AO?";
                values[] = {1,0};
                texts[] = {"Enabled","Disabled"};
                default = 1;
            };
            
        class CfgMusic
{   
 tracks[]={};
 
 class music1
        {
        name = "music1";
        sound[] = {"media\music\1.ogg", db+0, 1.0};
        };
        };
        
        class DefendAO {
                title = "Enable Defend AO?";
                values[] = {1,0};
                texts[] = {"Enabled","Disabled"};
                default = 0;
            };

 

Would Be Awesome if you guys can help me out with that

Link to comment
Share on other sites

Your hierachy is all wrong, the class params and all the mission params need to be unchanged then add your new class cfgmusic before or after. pseudocode : 

 

class params 

 

         class X

                     {

 

                      value X

 

                     };

};

 

class cfgmusic

{

 

          class Y

                     {

 

                     value Y

 

                     };

};

 

As you see you need to keep both main classes separate, the way you are doing it now has the game read the classParams and finding entries it shouldnt have =) 

Link to comment
Share on other sites

This is what you did wrong:

 

 

class Params
};
       {
        class AO {
                title = "Enable Main AO?";
                values[] = {1,0};
                texts[] = {"Enabled","Disabled"};
                default = 1;
            };
            
        class CfgMusic
{   
 tracks[]={};
 
 class music1
        {
        name = "music1";
        sound[] = {"media\music\1.ogg", db+0, 1.0};
        };
        };

        
        class DefendAO {
                title = "Enable Defend AO?";
                values[] = {1,0};
                texts[] = {"Enabled","Disabled"};
                default = 0;
            };

 

 

it needs to look something along the lines of this:

 

class Params
{
       
       class AO {
                title = "Enable Main AO?";
                values[] = {1,0};
                texts[] = {"Enabled","Disabled"};
                default = 1;
            };
            

        
        class DefendAO {
                title = "Enable Defend AO?";
                values[] = {1,0};
                texts[] = {"Enabled","Disabled"};
                default = 0;
            };

};

class CfgMusic

{   
 tracks[]={};
 
 class music1
        {
        name = "music1";
        sound[] = {"media\music\1.ogg", db+0, 1.0};
        };
};



For further understanding of the description.ext etc. read up on : https://community.bistudio.com/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Forum Statistics

    11.1k
    Total Topics
    66.4k
    Total Posts
×
×
  • Create New...