ricki 0 Posted October 13, 2007 Hi I defined some sounds in my config like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgSounds {  sounds[] = {};  class firstsound  {    name = "firstsound";    sound[] = {"\RCK_SOUND\sounds\first.ogg", db+10, 1.0};    titles[] = {};  }; }; Config.cpp went to a folder called RCK_SOUND as usual and pbo'ed. When I want to "_unit say firstsound" it says: "firstsound not found" Whats wrong with my config ? Tried several versions: \RCK_SOUND\sounds\first.ogg RCK_SOUND\sounds\first.ogg \sounds\first.ogg sounds\first.ogg \first.ogg first.ogg Sick now of restarting Arma again and again. Can someone tell me how it's done correctly ? regards rocko edit : SOLVED, see my third post Share this post Link to post Share on other sites
DBO_ 0 Posted October 13, 2007 have you tried _unit say "yoursound" works for me with same config as yours , as long as the code is from within the addon itself, not sure if your asking the sound to be played from a mission ? justincase my cpp <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSounds { class mysound01 { name = "mysound01"; sound[]={"\ofp2_sounds\sounds\mysound.wss",db+10,1}; titles[] = {0, $STRM}; }; }; Share this post Link to post Share on other sites
ricki 0 Posted October 13, 2007 I am sorry. It should say <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">playsound "firstsound" instead of Quote[/b] ]"_unit say firstsound".The playsound comand is the right which is in a script that comes with the addon. Share this post Link to post Share on other sites
DBO_ 0 Posted October 13, 2007 then i can only think you have named your subfolder "sound" instead of "sounds" because i made that mistake once and it killed me lol. but like i say mine works fine and i have done exactly as you ,except .wss which has no bearing here . good luck sry if i havent helped. Share this post Link to post Share on other sites
ricki 0 Posted October 13, 2007 thx for helping man. sound folder is called the same like in the config. <s>this drives me crazy</s> ------------------------------------------------------------ edit: ok, solved i removed the line that says <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sounds[] = {}; sound is playing now. Share this post Link to post Share on other sites
DBO_ 0 Posted October 13, 2007 lmao , never saw it glad you fixed Share this post Link to post Share on other sites
vipermaul 246 Posted October 13, 2007 Why does removing that line make that work?? I wish to understand. There has got to be a logical reason for that. If I understand I can apply the same logic else where because I every now and then I have pathing problems such as these. Share this post Link to post Share on other sites
DBO_ 0 Posted October 13, 2007 its exactly what it is it says there are no sounds. its similar in any situation like for example in the vehicle and unit config ,some people converted from ofp with default [] ={} and all weapons were lost for soldiers. Share this post Link to post Share on other sites
Planck 1 Posted October 13, 2007 Maybe if it had read: sounds[] = {"firstsound"}; or maybe: sounds[] = {firstsound}; (whichever works) it might have worked ok. Planck Share this post Link to post Share on other sites
vipermaul 246 Posted October 13, 2007 However, I have many config.cpp that uses lines of code like... sounds[] = {}; And the sounds work. So I am at a loss here. Share this post Link to post Share on other sites
ricki 0 Posted October 14, 2007 lol then its random ! guys, i dunno why this works without that line, but it does work. thats all what i wanted but ofp2's explanation sounds logical to me. Viper, can you please add a working example of your configs. I'd like to see that, or whats the difference to my config. regards rocko Share this post Link to post Share on other sites
Spectre-63 0 Posted October 17, 2007 I'm having a somewhat similar problem adding images to my GrenadierPack mod. Here's the setup: Inside the .pbo I have the config.cpp, and a folder named "Images" that contains the .paa files for the images. In my config.cpp, how do I reference the image files? Just by name? I tried referencing them by \S63_GrenadierPack\Images\image.paa but I got an error when attempting to view the image inside the ammobox. Should the first part of the path be the proper name of the mod (i.e. the Classname that is in the config.cpp) or the actual name of the PBO file (which, in my case, is S63_GrenadierPack_Cfg)??? Suggestions??? Share this post Link to post Share on other sites
ricki 0 Posted October 17, 2007 can you post an example segment of your config regarding the images ? edit: name the path after the name of your .pbo !! if it's S63_Grenadier_Pack_CFG then name all paths like that. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgPatches { class ROCKO_somewhat { has nothing to to with path when i call my .pbo "ROCKO_whatsome.pbo" edit2: regard the .pbo as your "start"-folder (but packed), so you would start referring by that at first. regards rocko Share this post Link to post Share on other sites
Spectre-63 0 Posted October 17, 2007 Thanks Rocko/Ricki That helps alot! Share this post Link to post Share on other sites
vipermaul 246 Posted October 19, 2007 lolthen its random ! guys, i dunno why this works without that line, but it does work. thats all what i wanted but ofp2's explanation sounds logical to me. Viper, can you please add a working example of your configs. I'd like to see that, or whats the difference to my config. regards rocko config.cpp of MOD version of Mando Missiles v2.2 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgPatches { class Mando_Missiles { units[] ={}; weapons[] ={}; requiredAddons[] = {}; requiredVersion = 1.08; version = 2.2; }; }; #include "\mando_missiles\mando_missile.h" // [... code removed for brevity ...] //************************************** class CfgSounds { sounds[] = {}; // Mando Sounds // Needed for Mando Missile ArmA #include "\mando_missiles\mando_sounds.h" }; Now the "\mando_missiles\mando_sounds.h" is as follows... Quote[/b] ] class mando_missile1 { name = "mando_missile1"; sound[] = {"\mando_missiles\sounds\mando_missile1.ogg", db-0, 1.0}; titles[] = {0}; }; class mando_radar1 { name = "mando_radar1"; sound[] = {"\mando_missiles\sounds\mando_radar1.ogg", db-0, 1.0}; titles[] = {0}; }; class mando_radar2 { name = "mando_radar2"; sound[] = {"\mando_missiles\sounds\mando_radar2.ogg", db-0, 1.0}; titles[] = {0}; }; class mando_target1 { name = "mando_target1"; sound[] = {"\mando_missiles\sounds\mando_target1.ogg", db-0, 1.0}; titles[] = {0}; }; class mando_noammo1 { name = "mando_noammo1"; sound[] = {"\mando_missiles\sounds\mando_noammo1.ogg", db-0, 1.0}; titles[] = {0}; }; class mando_noammo2 { name = "mando_noammo2"; sound[] = {"\mando_missiles\sounds\mando_noammo2.ogg", db-0, 1.0}; titles[] = {0}; }; class mando_radaron { name = "mando_radaron"; sound[] = {"\mando_missiles\sounds\mando_radaron.ogg", db-0, 1.0}; titles[] = {0}; }; class mando_radaroff { name = "mando_radaroff"; sound[] = {"\mando_missiles\sounds\mando_radaroff.ogg", db-0, 1.0}; titles[] = {0}; }; class mando_lockedon { name = "mando_lockedon"; sound[] = {"\mando_missiles\sounds\threatnewus.ogg", db-0, 1.0}; titles[] = {0}; }; class mando_scud { name = "mando_scud"; sound[] = {"\mando_missiles\sounds\mando_scud.ogg", db+50, 1.0}; titles[] = {0}; }; And again I do not pretend to understand this. I just learn from what I see other great scripters do. And this is working for me. I agree what has been said earlier in this thread makes sense but then why is my code working?? I scratch my head while waiting for a GURU to explain Share this post Link to post Share on other sites
ricki 0 Posted October 19, 2007 uuh, there is a mod version of this script ??? nice, gotta look for it. but thanks for the config, man. gonna wait for a Guru to explain, too. Share this post Link to post Share on other sites