Jump to content

Recommended Posts

is it possable to have music originating from a radio(or object) and you can only hear it when you within a certain radias i have a military base and fortunate son would be cool to be blastin on the radio (:

Share this post


Link to post
Share on other sites

I'm doing the same thing in my mission. I got the radio to play the song by doing the following in the description.ext:

// === Sounds ================================================>

class CfgSounds

{

tracks[]={AlcoholMono};

class AlcoholMono

{

name="AlcoholMono";

sound[]={\sounds\AlcoholMono.ogg, db-30, 1.0};

titles[] = { };

};

};

Then I went into the editor and placed the following in the radio init line: this say "AlcoholMono"

It plays the song and works, but only once. It has the cool localization affect, walking up to it the song plays louder, going away it gets quiet. How do I loop it. I have seen lots of threads on how to do it, but none click for me. I feel like I am missing a key piece of information that everyone else has. I understand that I need to have a script file. It would be great if someone could show me exactly what that script would look like. Once that file is made, how do I activate that script in the actual map on the object (the radio). I assume I put something in the radio's init line?

I tried to use JBOY's sound loop function, but I guess I am too new to get it intuitively. Maybe a step by step on how to use that because it seems to be the right solution.

Thanks in advance.

Share this post


Link to post
Share on other sites

Yeah, I got JohnnyBoy's function to work last night. I have the sqf file in my mission folder (not in the function folder - that gives me an error when I launch the mission), I put the init line that he has in my init file. Then I put the following in the target objects init line:

dmy=[tableradio, "AlcoholMono", 249 , -1] execvm "JBOY_soundLoop.sqf";

Works like a charm. I would however, like the function to be in my functions folder and it know where to find it. Anyone know how to edit the JBOY deal so it finds the soundloop.sqf if I drop it into the functions folder?

Share this post


Link to post
Share on other sites
dmy=[tableradio, "AlcoholMono", 249 , -1] execvm [color="Red"][b]"functions\JBOY_soundLoop.sqf"[/b][/color];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×