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...