konyo 14 Posted August 25, 2010 Hi all. I’m trying to make music come out from the radio you can place down. Ive put a sound from the 'Sound' column under Empty. Ive then pressed the 'music' option, placed it down but its plays some music that i don’t like, Anyway i can change that to music i want to suit the mission? Ive also used cfgSound on it, but it plays the sound still when you walk away from the radio if you know what i mean? I want it to play when im near the radio and stop when you walk away from it? Anyone know how to do this? Thankyou. Share this post Link to post Share on other sites
zigzag 0 Posted August 25, 2010 Not sure if I get you right, but if you use say the sound will come from the object. Share this post Link to post Share on other sites
konyo 14 Posted September 19, 2010 Hmm.. It works but really the sort of thing i was looking for. Want the music to fade out when you get further away from it. Like your walking away from a radio. Its get more quiet? Share this post Link to post Share on other sites
CarlGustaffa 4 Posted September 19, 2010 (edited) Sound spatiality (eh, is that even a word?) is only supported for mono files, and have to be played as either a cfgSound (using say/say3D) or cfgSFX (trigger type). The command playSound will not provide spatial information, as it is always "played inside your head" so to speak. With music, I'm not sure if you can fadeMusic based on distance to vehicle, but it only deals with sound level, no clues as to where the sound is playing from. Edited September 19, 2010 by CarlGustaffa Share this post Link to post Share on other sites
celery 8 Posted September 19, 2010 Hmm.. It works but really the sort of thing i was looking for. Want the music to fade out when you get further away from it. Like your walking away from a radio. Its get more quiet? The volume has to be really low in description.ext. Something like 0.01. Share this post Link to post Share on other sites
konyo 14 Posted September 19, 2010 Sound spatiality (eh, is that even a word?) is only supported for mono files, and have to be played as either a cfgSound (using say/say3D) or cfgSFX (trigger type). The command playSound will not provide spatial information, as it is always "played inside your head" so to speak.With music, I'm not sure if you can fadeMusic based on distance to vehicle, but it only deals with sound level, no clues as to where the sound is playing from. Ok thankyou, ill give that a go now and see how it goes, ill edit this post with the news :) The volume has to be really low in description.ext. Something like 0.01. And as for the sound being 0.01, ill give that a go too and let you know :) Thanks Share this post Link to post Share on other sites
katdogfizzow 13 Posted September 19, 2010 (edited) Sorry I dont have a lot of information on "how to" but am very interested in this topic as well. i wonder if the ace radio mod could be altered to your desire? That is really well done and is what you describe Maybe someone has more info. i.e... class Item1 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={4472.7002,3,11225.294}; id=1; side="LOGIC"; vehicle="ACE_RadioTalk_Logic"; leader=1; skill=0.60000002; synchronizations[]={0,93}; }; Edited September 19, 2010 by katdogfizzow Share this post Link to post Share on other sites
tpw 2315 Posted September 19, 2010 I got into a car spawned by the ambient civilian vehicles module in zargabad and it had some cheesy metal coming from its car stereo. The music faded as I walked from the car. So it can definitely be done. I'd be interested to see how you go. Share this post Link to post Share on other sites
CaptainBravo 0 Posted September 20, 2010 check out my mission Desert Eagle. It has 2 SUVs each playing its own radio music via trigger attached to vehicle. http://forums.bistudio.com/showthread.php?t=106938 Share this post Link to post Share on other sites
konyo 14 Posted September 20, 2010 check out my mission Desert Eagle. It has 2 SUVs each playing its own radio music via trigger attached to vehicle.http://forums.bistudio.com/showthread.php?t=106938 Ok ill download this, see how you got it working with it. Share this post Link to post Share on other sites
wontial 10 Posted September 22, 2010 (edited) check out my mission Desert Eagle. It has 2 SUVs each playing its own radio music via trigger attached to vehicle.http://forums.bistudio.com/showthread.php?t=106938 CaptainBravo, could you be kind enough to post only the relevent radio music script or command? It seems one has to download and install half a dozen addons from ace to fffa terrorists to even open up your mission, and I'd really like to forgo such hassle. Edited September 23, 2010 by wontial Share this post Link to post Share on other sites
AZCoder 921 Posted September 23, 2010 You may want to check out Mando Music: http://www.armaholic.com/page.php?id=7407&highlight=MANDO It includes a script named "mando_checkradio.sqf" that calculates volume by distance. Share this post Link to post Share on other sites
twirly 11 Posted September 23, 2010 Try this it might be what you are after.... The music must be in "oog" format. You can use a freeware program called "Audacity" to make oogs from wavs or whatever. Google it. In "description.ext" put this code:- class CfgSounds { sounds[]= {song1}; class song1 { name = "song1"; sound[] = {\sounds\song1.ogg, [color="Red"]db-0[/color] ,1.0}; titles[] = {}; }; }; In your trigger or whatever you are using to start the music use "say"....like this:- radio say "song1"; I just tried this and it works.....but I can still hear the music 500m away....although the volume is softer than when I trigger it at 30m. Maybe playing with the volume in red....but as far as I know volume is broken in the .ext and does not work. Your mileage might vary. I am testing it now and really I am not quite sure if it is decreasing. Volume is wonky in this game anyway. Sound pressure level doubles every 3db in real life....but not here! :) Share this post Link to post Share on other sites
kylania 568 Posted September 23, 2010 I am testing it now and really I am not quite sure if it is decreasing. Remember you need to Save the mission each time you change the description.ext for the changes to take effect. (Or reload the mission, but saving is quicker.) Share this post Link to post Share on other sites
tpw 2315 Posted September 23, 2010 Try this it might be what you are after....The music must be in "oog" format. You can use a freeware program called "Audacity" to make oogs from wavs or whatever. Google it. In "description.ext" put this code:- class CfgSounds { sounds[]= {song1}; class song1 { name = "song1"; sound[] = {\sounds\song1.ogg, [color="Red"]db-0[/color] ,1.0}; titles[] = {}; }; }; In your trigger or whatever you are using to start the music use "say"....like this:- radio say "song1"; I just tried this and it works.....but I can still hear the music 500m away....although the volume is softer than when I trigger it at 30m. Maybe playing with the volume in red....but as far as I know volume is broken in the .ext and does not work. Your mileage might vary. I am testing it now and really I am not quite sure if it is decreasing. Volume is wonky in this game anyway. Sound pressure level doubles every 3db in real life....but not here! :) This looks excellent thanks Twirly, I'll give it a try myself. Share this post Link to post Share on other sites
twirly 11 Posted September 23, 2010 Remember you need to Save the mission each time you change the description.ext for the changes to take effect. (Or reload the mission, but saving is quicker.) Thanks....very true. Sometimes I forget this myself.:) Share this post Link to post Share on other sites
wontial 10 Posted September 23, 2010 Try this it might be what you are after....The music must be in "oog" format. You can use a freeware program called "Audacity" to make oogs from wavs or whatever. Google it. In "description.ext" put this code:- class CfgSounds { sounds[]= {song1}; class song1 { name = "song1"; sound[] = {\sounds\song1.ogg, [color="Red"]db-0[/color] ,1.0}; titles[] = {}; }; }; In your trigger or whatever you are using to start the music use "say"....like this:- radio say "song1"; I just tried this and it works.....but I can still hear the music 500m away....although the volume is softer than when I trigger it at 30m. Maybe playing with the volume in red....but as far as I know volume is broken in the .ext and does not work. Your mileage might vary. I am testing it now and really I am not quite sure if it is decreasing. Volume is wonky in this game anyway. Sound pressure level doubles every 3db in real life....but not here! :) This works! It works! Thank you Twirly, that was brilliant. At first I tried -50 and couldn't hear anything at all, now I've set it to -20 and it works just like the "empty-sound-music" thingie. Kudos to you! Share this post Link to post Share on other sites
Zalsak 10 Posted September 23, 2010 Try this it might be what you are after....The music must be in "oog" format. You can use a freeware program called "Audacity" to make oogs from wavs or whatever. Google it. In "description.ext" put this code:- class CfgSounds { sounds[]= {song1}; class song1 { name = "song1"; sound[] = {\sounds\song1.ogg, [color="Red"]db-0[/color] ,1.0}; titles[] = {}; }; }; In your trigger or whatever you are using to start the music use "say"....like this:- radio say "song1"; I just tried this and it works.....but I can still hear the music 500m away....although the volume is softer than when I trigger it at 30m. Maybe playing with the volume in red....but as far as I know volume is broken in the .ext and does not work. Your mileage might vary. I am testing it now and really I am not quite sure if it is decreasing. Volume is wonky in this game anyway. Sound pressure level doubles every 3db in real life....but not here! :) How can i get this to loop? I know only: #loop playsound "song" ~350 goto "loop" but it doesn't have the same effect. If i try this my game crashes after a massive fps drop: #loop _this say "name of your song" ~120 - //the actual length of the song, we use it if you want the song to loop over goto "loop" Thanks! Share this post Link to post Share on other sites
CaptainBravo 0 Posted September 23, 2010 goes into: radio.sqf while {true} do { radio say "nameofsound"; sleep 30; }; Then activate by: [] execVM "Scripts\radio.sqf"; Share this post Link to post Share on other sites
Zalsak 10 Posted September 23, 2010 goes into: radio.sqfwhile {true} do { radio say "nameofsound"; sleep 30; }; Then activate by: [] execVM "Scripts\radio.sqf"; Thanks! Works perfect :) Share this post Link to post Share on other sites
konyo 14 Posted October 1, 2010 Try this it might be what you are after....The music must be in "oog" format. You can use a freeware program called "Audacity" to make oogs from wavs or whatever. Google it. In "description.ext" put this code:- class CfgSounds { sounds[]= {song1}; class song1 { name = "song1"; sound[] = {\sounds\song1.ogg, [color="Red"]db-0[/color] ,1.0}; titles[] = {}; }; }; In your trigger or whatever you are using to start the music use "say"....like this:- radio say "song1"; I just tried this and it works.....but I can still hear the music 500m away....although the volume is softer than when I trigger it at 30m. Maybe playing with the volume in red....but as far as I know volume is broken in the .ext and does not work. Your mileage might vary. I am testing it now and really I am not quite sure if it is decreasing. Volume is wonky in this game anyway. Sound pressure level doubles every 3db in real life....but not here! :) Whoo! Its works, thankyou i finaly found a working script for this :) :D Share this post Link to post Share on other sites
RoccoDW 10 Posted December 11, 2010 Hi Ive been searching for this for a while now and this has been the most useful thread by far. I'm also trying to add a custom "static" sound to my game (i.e radio playing music in barracks) There are place-able sounds available in the editor (dog, cheesy eastern music etc.) that already does everything the above mentioned scripts does. it fades in and out as you walk around it etc. Is there any way to add more such objects from custom sounds without scripts? Share this post Link to post Share on other sites
CarlGustaffa 4 Posted December 11, 2010 Actually, you can't create those objects using scripts either, if you want them to have custom sounds, you have to make them as an addon. Also see here for more information. Share this post Link to post Share on other sites