NEO -PZ- 0 Posted April 23, 2002 Hey, The code for music is as following. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMusic { tracks[]= { princeigor }; class princeigor { name = "princeigor"; sound[] = {\music\princeigor.ogg, db+0, 1.0}; }; } <span id='postcolor'> But how should this code be if I want to add voices instead? Thanks in advance ! Share this post Link to post Share on other sites
RED 0 Posted April 23, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgSounds { voice1 }; class voice1 { name = "voice1"; sound[] = {"voice1.ogg", db+60, 1.0}; titles[] = { }; }; }; }; <span id='postcolor'> You have to put your voice files in a folder called "sound" in the mission DIR. RED Share this post Link to post Share on other sites
NEO -PZ- 0 Posted April 23, 2002 Thanks ! /Edit If I use more than one sound file then? Can't get it to work Share this post Link to post Share on other sites
DestroyerX 0 Posted April 24, 2002 This is an example of More than 1 Music and Voices: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMusic { tracks[]= { music1, music2, music3 }; class music1 { name = "music1"; sound[] = {\music\music1.ogg, db+0, 1.0}; }; class music2 { name = "music2"; sound[] = {\music\music2.ogg, db+0, 1.0}; }; class music3 { name = "music3"; sound[] = {\music\music3.ogg, db+0, 1.0}; }; } class CfgSounds { sounds[] = { 1, 2, 3, 4, 5 }; class 1 { name = "1"; sound[] = {"1.ogg", db+290, 1.0}; titles[] = { }; }; class 2 { name = "2"; sound[] = {"2.ogg", db+290, 1.0}; titles[] = { }; }; class 3 { name = "3"; sound[] = {"3.ogg", db+290, 1.0}; titles[] = { }; }; class 4 { name = "4"; sound[] = {"4.ogg", db+290, 1.0}; titles[] = { }; }; class 5 { name = "5"; sound[] = {"5.ogg", db+290, 1.0}; titles[] = { }; }; <span id='postcolor'> Share this post Link to post Share on other sites
Nic 0 Posted April 24, 2002 If you would want to use two sounds it would look like this class CfgSounds { class sound1{name = "sound1";sound[] = {"sound1.ogg", db +60, 1.0};titles[] = {0, $STRM_sound1};}; class sound2{name = "sound2";sound[] = {"sound2.ogg",db +60, 1.0};titles[] = {0 $STRM_sound2};}; }; If you want to add more than that just put the new class and sound info between  {  and  }; so like this class CfgSounds { class sound1 blah blah blah class sound2 blah blah blah class sound3 blah blah blah and so on }; Also make sure to keep in mind that sound files unlike music files have to be mono only, not stereo, and also must be at the most 44100Khz. Hope this helps Share this post Link to post Share on other sites