Hammer Posted June 9, 2014 Report Share Posted June 9, 2014 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 More sharing options...
0 Guest Posted June 9, 2014 Report Share Posted June 9, 2014 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 More sharing options...
0 Hammer Posted June 9, 2014 Author Report Share Posted June 9, 2014 Thanks! Link to comment Share on other sites More sharing options...
0 Havoc302 Posted January 1, 2015 Report Share Posted January 1, 2015 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 More sharing options...
0 jahangir13 Posted January 2, 2015 Report Share Posted January 2, 2015 Watte pointed out that the CLASSNAME needs to be used. Your classname is newspawnsound but you call new_spawn_sound ?! Link to comment Share on other sites More sharing options...
0 Havoc302 Posted January 2, 2015 Report Share Posted January 2, 2015 Crap, that'll be it, lol sorry, thanks for pointing out the obvious, I clearly needed another set of eyes to look at it. Link to comment Share on other sites More sharing options...
0 jahangir13 Posted January 2, 2015 Report Share Posted January 2, 2015 Yes, sometimes that's needed ;) Link to comment Share on other sites More sharing options...
0 Tech_Support Posted January 4, 2015 Report Share Posted January 4, 2015 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 More sharing options...
Question
Hammer
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....
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now