Llano 11 Posted December 14, 2013 So, i have this in my description.ext: class CfgSounds { sounds[] = {}; class fortunate { name = ""; sound[] = {"\fortunateson.ogg", 10, 1.0}; titles[] = {}; }; }; and in my mission (player initialization): player addAction["play", {heli1 say3D "fortunate_son";}]; where i have a helicopter with the name "heli1". The filename is located in my mission folder. I've tried songname without quotes, without "\", but i just can't get it to work. What have i done wrong? Share this post Link to post Share on other sites
iceman77 19 Posted December 14, 2013 example mission class CfgSounds { sounds[]={fortunate}; class fortunate { name="fortunate"; sound[]={"fortunateSon.ogg",.5,1}; titles[]={}; }; }; Share this post Link to post Share on other sites
Llano 11 Posted December 14, 2013 example mission class CfgSounds { sounds[]={fortunate}; class fortunate { name="fortunate"; sound[]={"fortunateSon.ogg",.5,1}; titles[]={}; }; }; Thanks. After testing some things, i noticed that apperently it's something wrong with my musicfile :) EDIT: Could it be that my musicfile is to big? It's 36 megabytes. Share this post Link to post Share on other sites
iceman77 19 Posted December 14, 2013 I see. Glad you have it sorted. Share this post Link to post Share on other sites
Llano 11 Posted December 14, 2013 I see. Glad you have it sorted. How did you convert your file to .ogg? Share this post Link to post Share on other sites
Llano 11 Posted December 14, 2013 Audacity Well, so did i. I compared my musicfile with your, and they are exact same. Stereo, 11025 Hz, 16-Bit PCM. I even cut the file, so it only was 5 seconds long, and it still don't work. But with your musicfile, it does. Really weird. Share this post Link to post Share on other sites
dragonsyr 21 Posted December 14, 2013 (edited) it is not clear from what i see in your posts , if you use this class CfgSounds { sounds[]={fortunate}; class fortunate { name="fortunate"; sound[]={"fortunateSon.ogg",.5,1}; titles[]={}; }; }; then you play the sound like this player addAction["play", {heli1 say3D "fortunate";}]; i m right? Edited December 14, 2013 by dragonsyr Share this post Link to post Share on other sites
Llano 11 Posted December 14, 2013 it is not clear from what i see in your posts , if you use this class CfgSounds { sounds[]={fortunate}; class fortunate { name="fortunate"; sound[]={"fortunateSon.ogg",.5,1}; titles[]={}; }; }; then you play the sound like this player addAction["play", {heli1 say3D "fortunate";}]; i m right? Correct. Share this post Link to post Share on other sites
dragonsyr 21 Posted December 14, 2013 (edited) try this class CfgSounds { sounds[] = {fortunate}; class fortunate {name="Fortunate"; sound[]={"\sounds\fortunateSon.ogg",db+5,1.0}; titles[] = {};}; }; and call with player addAction["play", {heli1 say3D "Fortunate";}]; make a folder named sounds in your mission folder and in there, put your sound file. Edited December 14, 2013 by dragonsyr Share this post Link to post Share on other sites
Llano 11 Posted December 14, 2013 try this class CfgSounds { sounds[] = {fortunate}; class fortunate {name="Fortunate"; sound[]={"\sounds\fortunateSon.ogg",db+5,1.0}; titles[] = {};}; }; and call with player addAction["play", {heli1 say3D "Fortunate";}]; make a folder named sounds in your mission folder and in there, put your sound file. Well. There is definitely something wrong with my music file. Iceman77's code works for me when playing his music file, but if i swap the music file to mine, it doesn't work. Share this post Link to post Share on other sites
dragonsyr 21 Posted December 14, 2013 btw make use of the folder "sounds". is the proper way for playing custom sounds Share this post Link to post Share on other sites
Llano 11 Posted December 14, 2013 btw make use of the folder "sounds". is the proper way for playing custom sounds Yeah, but i'm trying to focus to get it to work first :) Share this post Link to post Share on other sites
Llano 11 Posted December 15, 2013 Btw here is the .ogg file http://www.mediafire.com/download/9esci3haxcbszyi/fortunateSon2.rar Share this post Link to post Share on other sites
Llano 11 Posted December 15, 2013 Alright, i found the problem. Apperently the music file had to be in "mono", and not "stereo". Share this post Link to post Share on other sites
iceman77 19 Posted December 15, 2013 Oh nice. Good to see you finally got it working lol. Share this post Link to post Share on other sites
Llano 11 Posted December 15, 2013 Oh nice. Good to see you finally got it working lol. Yeah, it truly was a pain in the ass ;) Sent from my LG-E975 using Tapatalk Share this post Link to post Share on other sites