Forum Jump :

Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2014-05-20 00:05        
     
Hello. I am a new forums member just getting on to ask for a little help. I have been doing mission editing for awhile now and am look for some help. I recently took an interest in adding custom music to my missions. I created a Description.ext file for my mission, and in another folder in the mission directory called "music", placed 3 ogg files containing the custom songs i want to play. in the Description.ext i have the following code:

class CfgMusic
{
	tracks[]={Music1, Music2, Music3};

	class Music1
	{
		name = "Music1";
		sound[] = {\music\Music1.ogg, db+25, 1.0};
        };

};

	class Music2
	{
		name = "Music2";
		sound[] = {\music\Music2.ogg, db+25, 1.0};
        };

};

	class Music3
	{
		name = "Music3";
		sound[] = {\music\Music3.ogg, db+25, 1.0};
        };

};


after adding this i opened my mission in the editor and placed a trigger that activated for any present persons', and in the "on act." box i placed - playmusic "Music1" - . I didnt get any errors when i pressed OK. then i go to preview the mission and it starts up, still no errors. drive over the trigger, no errors, but no sound. not sure why this is happening. I also have this in my startup parameters: -showscripterrors .. And nothing came up with this on either. Any help would be much appreciated. Sorry if i posted this in the wrong area. Feel free to move it.

-------EDIT-------
Now I am also getting a new error when i attempt to load the mission in the editor that says: Config : some input after EndOfFile . I get this error after my game crashes when attempting to load the mission via editor. Again any help would be much appreciated.

-------EDIT AGAIN-------
updated my code using some more arrays, got rid of the "EndofFile" error, but now i get a new one that says "File C:\Users\Documents\ArmA 2 Other Profiles\ J%2e%20Sosa\missions\air raid.Takistan\description.ext, line 6: Config: '"' encountered instead of '{'


I am using the following code now-
class CfgMusic
{
	tracks[]={Music1, Music2, Music3};

	class Music1
	{
		name[] = "Music1";
		sound[] = {\music\Music1.ogg, db+25, 1.0};
        };

};

	class Music2
	{
		name[] = "Music2";
		sound[] = {\music\Music2.ogg, db+25, 1.0};
        };

};

	class Music3
	{
		name[] = "Music3";
		sound[] = {\music\Music3.ogg, db+25, 1.0};
        };

};


Modedit:
Do not crosspost! If you posted in the wrong section all you have to do is contact an admin or moderator and ask him to move the thread to the proper section. Seems pretty standard to me...

This post was edited by Foxhound (2014-05-20 16:57, ago)


Author Message


Posts: 19
Rank:


Level: Member

Country: au
Location: Perth
Occupation: Student
Age: 21
In-game name: Cooked Cunt

 
#2 Posted at 2014-05-26 19:19        
     
Im not sure but i think using this code might solve your problem
class CfgMusic
{
    tracks[]={};
        class Music1
        {
            name = "Music1
            sound[] = {"\music\Music1.ogg", db+25, 1.0};
    };
    
        class Music2
        {
            name = "Music2
            sound[] = {"\music\Music2.ogg", db+25, 1.0};
    };

        class Music3
        {
            name = "Music3
            sound[] = {"\music\Music3.ogg", db+25, 1.0};
    };
};

If not get back to me and i will look into it :)


Advertisement


Author Message

SavageCDN  

Armaholics priest


Posts: 475
Rank:


Country: ca
Location: Ottawa
Occupation: Fighting with Exchange
Age: 45
In-game name: =VG= SavageCDN

 
#3 Posted at 2014-05-26 19:34        
     
Also remember any changes you make to description.ext you need to re-save your mission for those changes to take effect (just press save in editor).

If you change media files like .ogg or .jpp (music or loading screens) you will have to exit right out of the editor and re-load your mission.

Bless you my son.