OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mystific on 21 May 2003, 14:57:00

Title: Radio Talk!
Post by: Mystific on 21 May 2003, 14:57:00
I need help with an issue in Radio scripting.
I have inserted two sounds into the Engine using Cool Edit 3.0. I inserted them into both music and sounds. the music works perfecttly as well as the playsound command. But it won't work when i use

aP say "sound2"

It doesn't tell me that it doesn't find the sound, there is just no sound..it's all quiet. Is there anyone that can help me in that issue?

Title: Re:Radio Talk!
Post by: Knut Erik on 21 May 2003, 22:30:53
Sounds like you have a prob either with your sound file or your description. Upload a quote from your description file and let us have a look at it.

Note: The sounds must be in MONO format to work!
Title: Re:Radio Talk!
Post by: Mystific on 21 May 2003, 22:52:56
class CfgRadio
{
     sounds[]={ Radio1,Radio2};
    class Radio1
    {
         name="Radio1";
         sound[]={"\sound\revelj.ogg",db+10,1.0};
         title=$STRM_Radio1;
     };
    class Radio2
    {
         name="Radio2";
         sound[]={"\sound\test.ogg",db+10,1.0};
         title=$STRM_Radio2;
     };
};

Directly from my Description...The sound worked when i imported it as Sound and used the Playsound command.
Title: Re:Radio Talk!
Post by: Knut Erik on 22 May 2003, 10:05:57
Okay... Try this:


class CfgRadio
{
    sounds[]={ Radio1,Radio2};
    class Radio1
    {
        name="Radio1";
        sound[]={"\sound\revelj.ogg",db+10,1.0};
        title=$STRM_Radio1;
    };
    class Radio2
    {
        name="Radio2";
        sound[]={"\sound\test.ogg",db+10,1.0};
        title=$STRM_Radio2;
    };
};

Remember, the radio files must be in your sounds folder
Remove the text that is marked with blue
Does it work now?
Title: Re:Radio Talk!
Post by: Mystific on 22 May 2003, 14:20:02
1. It seems as if he uses the cfg_sound instead of cfg_radio when using the command say.

2. I got the command sideradio to work but then the radiochatter in the background is louder then the soundfile itself. Any suggestion?

I appreciate that you are taking your time to help me!
Title: Re:Radio Talk!
Post by: Knut Erik on 22 May 2003, 15:48:31
Did you use the "say" command on the radio? Lol  ;D
I thought you knew about the sideRadio command.

One way to solve your prob is this:

class CfgRadio
{
    sounds[]={ Radio1,Radio2};
    class Radio1
    {
        name="Radio1";
        sound[]={"\sound\revelj.ogg",db+100,1.0};
        title=$STRM_Radio1;
    };
    class Radio2
    {
        name="Radio2";
        sound[]={"\sound\test.ogg",db+100,1.0};
        title=$STRM_Radio2;
    };
};

play arround with the text that I have marked with blue.
Any help in that  :-\
Title: Re:Radio Talk!
Post by: Mystific on 22 May 2003, 22:46:19
Thank you very much...I declare this case closed!
Title: Re:Radio Talk!
Post by: bmgarcangel on 23 May 2003, 00:49:13
there is another way to do it.  

Jk playsound "junior"

Now this is what I do in the description.ext thing:

   class Junior
   {
      name = "Junior
      sound[] = {"Junior db-40, 1.0};
      titles[] =
      {
         0, $STRM_
      };
   };


Before I started doing this the playsound command never worked.  But I see you also got it solved but i thought this might help
Title: Re:Radio Talk!
Post by: bmgarcangel on 23 May 2003, 00:50:53
There's a classRadio!!!!!!!!!!!  I've always used radio as music!!  

How does this classradio work?
Title: Re:Radio Talk!
Post by: Mystific on 23 May 2003, 13:26:17
Please develop

"There's a classRadio!!!!!!!!!!!  I've always used radio as music!!  

How does this classradio work? "

What do you mean with a classradio?, do you mean "cfg radio"?
Title: Re:Radio Talk!
Post by: Knut Erik on 23 May 2003, 14:05:49
Brendan : Check out the sticky topic at the top of this board.  ;)

Mystific : If your problem is solved, simply press the solve button  :)
Title: Re:Radio Talk!
Post by: Mystific on 23 May 2003, 14:22:32
Knut!

I still can't get the "say" command to work..i have entered the .ogg files as sounds. It fidns them but i dont hear anything when i activate it through a radio command.
Title: Re:Radio Talk!
Post by: Knut Erik on 23 May 2003, 14:58:29
Strange...
Attactch your mission so I can have a look.  :D
(Remove ALL addons first!)  ;D
Title: Re:Radio Talk!
Post by: Mystific on 23 May 2003, 16:03:07
it is too big to attach..can i mail it to you?, or do you just need a part of it?
Title: Re:Radio Talk!
Post by: Knut Erik on 23 May 2003, 21:47:23
Send me an E-Mail

knut_erikskare@hotmail.com
Title: Re:Radio Talk!
Post by: Mystific on 24 May 2003, 17:07:33
The email was too big.
But this is a summary of what i have done.

Description.ext

class CfgSounds
{
    sounds[]={ Sound1,Sound2};
    class Sound1
    {
         name="My sound1";
         sound[]={"revelj.ogg",db-10,1.0};
         titles[]=
         {
         };
    };
    class Sound2
    {
         name="My sound2";
         sound[]={"test.ogg",db-10,1.0};
         titles[]=
         {
            0,$STRM_Sound2;
         };
    };
};

Stringtable.csv

STRM_Sound2,"Say this, Say that","","","","","",

And then i have just placed a guy on desert island named ap. I have then created a trigger with radius 0x0:

Condition: Radio alpha

On activation: ap say "sound2"


What could possibly be wrong?