PDA

View Full Version : Adding sound



froggyluv
Jun 5 2009, 00:08
Once upon a time when OFP was king I was pretty good with sounds messing with ogg's and that lipsync program, but alas, all is forgotten so I need some basic help.

I'm trying to add some radio chatter and have created the sound file:"Alpha 2 clearance.ogg"

Here is my cfg:

class CfgSounds
{
sounds[]= {Sound1};
class Sound1
{
name = "sound1";
sound[] = {\sounds\Alpha 2 clearance.ogg, db-30, 0.9.8};
};
};

... now I've placed a trigger in my mission to 'playsound "sound1" ', and it works but not before getting the error message:

No entry 'C:Blah\blah\description.ext/cfgSounds/Sound.titles'.

Again it does work but I'd like to get rid of that error message.

Junker
Jun 5 2009, 00:53
U forgot the Title[]=..


class Cfgsound
{
tracks[] = {blah};

class blah
{
name = "blah";
sound[] = {\sound\blah.ogg, 1.0,1.0};
titles[] =
{
};
};
};

froggyluv
Jun 5 2009, 01:59
Thanks that did indeed work. I really need a guide to help me get into this stuff again.

froggyluv
Jun 5 2009, 21:02
I have the Player call HQ upon being detected by opfor trigger (using sounds not radio)


class Sound3
{
name = "sound3";
sound[] = {\sounds\alpha respond 1.ogg, db+10, 1.0};

titles[] =
{
};
};


class Sound4
{
name = "sound4";
sound[] = {\sounds\alpha 2 backup.ogg, db+10, 1.0};
titles[] =
{
};
};

...using trigger to play 'sound3'. How do I get Hq to respond immediately with 'sound4' hopefully just in editor without more scripts?

Junker
Jun 5 2009, 23:33
add another trigger; relace This in the condition box with a name lets call it response.
set the 3 timeouts to cover the length of the original sound and maybe add a few more secs for spacing..

Now in your original trigger type in the activation box response = true

job done :)

froggyluv
Jun 6 2009, 02:29
add another trigger; relace This in the condition box with a name lets call it response.
set the 3 timeouts to cover the length of the original sound and maybe add a few more secs for spacing..

Now in your original trigger type in the activation box response = true

job done :)

Aye, thanks mate yet I already released the mission with a hack :D

Good to know!

PhatVybz
Jun 23 2009, 18:26
sorry for my english this time..its not my type of thing to express

i have a problem with adding sound..the problem is that they play like multiple times within a 2 second range


respawn=3;
respawndelay=6;

disabledAI = 1;
onLoadMission=:: [16RD] [CTF] Berezino :: BY [16RD] PhatVybz ::;

titleParam1 = $STR_MP_TIME;
valuesParam1[] = {10000, 300, 600, 900, 1200, 1500, 1800, 2700, 3600, 7200};
defValueParam1 = 1800;
textsParam1[] = {$STR_MP_NOLIMIT, $STR_MP_TIME_05, $STR_MP_TIME_10, $STR_MP_TIME_15, $STR_MP_TIME_20, $STR_MP_TIME_25, $STR_MP_TIME_30, $STR_MP_TIME_45, $STR_MP_TIME_60, $STR_MP_TIME_120};

titleParam2 = $STR_MP_SCORE;
valuesParam2[] = {10000, 5, 7, 10, 15, 20, 25, 30};
defValueParam2 = 5;
textsParam2[] = {$STR_MP_NOLIMIT, 5, 7, 10, 15, 20, 25, 30};

class Header
{
gameType = CTF;
minPlayers = 2;
maxPlayers = 20;
};



class RscStdText
{
type=0;
idc=-1;
style=2;
colorBackground[]={0,0,0,0};
colorText[]={1,1,1,1};
font="TahomaB";
size=1;
};

class RscTitles
{
titles[]={"intro"};

class intro
{
idd=-1;
movingEnable=0;
duration=45; //45 seconds is the time of the sound to play
fadein=0;
name="intro";
controls[]={"title1","title2","title3","title4","title5","pic1","pic2","pic3","pic4"};


class title1 : RscStdText
{
text="";
colorText[]={1,0,0,1};
sizeEx = 0.1;
x=0.0;
y=0.1;
w=1.0;
h=0.1;
};
class title2 : RscStdText
{
text="";
colorText[]={1,0,0,1};
sizeEx = 0.04;
x=0.0;
y=0.25;
w=1.0;
h=0.05;

};
class title3 : RscStdText
{
text="presents";
colorText[]={1,1,1,1};
sizeEx = 0.04;
x=0.0;
y=0.4;
w=1.0;
h=0.05;

};
class title4 : RscStdText
{
text="";
colorText[]={1,1,1,1};
sizeEx = 0.04;
x=0.0;
y=0.35;
w=1.0;
h=0.05;

};
class title5 : RscStdText
{
text="http://16rd.forumactif.com/";
colorText[]={1,1,1,1};
sizeEx = 0.03;
x=0.0;
y=0.85;
w=1.0;
h=0.05;


};
class pic1 : RscStdText
{
style=48;
text="CLAN.jpg";
sizeEx = 0.02;
x=0.15;
y=0.10;
w=0.70;
h=0.20;
};
class pic2 : RscStdText
{
style=48;
text="CYPRESS.jpg";
sizeEx = 0.1;
x=0.30;
y=0.60;
w=0.40;
h=0.20;
};
class pic3 : RscStdText
{
style=48;
text="OCB.jpg";
sizeEx = 0.1;
x=0.80;
y=0.70;
w=0.20;
h=0.20;
};
class pic4 : RscStdText
{
style=48;
text="OCB.jpg";
sizeEx = 0.1;
x=0;
y=0.70;
w=0.20;
h=0.20;
};

};

};
class CfgSounds //like you did Junker and it works
{
sounds[] = {Score, Capture, intro};


class Score
{
name = "Score";
sound[] = {\Sound\Score.ogg, db+0, 1.0};
titles[] = {0,""};
};
class Capture
{
name = "Capture";
sound[] = {\Sound\Capture.ogg, db+0, 1.0};
titles[] = {0,""};
};
class intro
{
name = "intro";
sound[] = {\Sound\intro.ogg, db-8, 1.0};
titles[] = {0,""};
};
};
};

after //is my explaination of what i did in the purpose to have sound ingame
thnx for all help possible ;)

PhelanKA7
Aug 30 2009, 07:31
Once upon a time when OFP was king I was pretty good with sounds messing with ogg's and that lipsync program, but alas, all is forgotten so I need some basic help.

Sorry to necro this thread, but could someone point me in the direction of how to get NPCs to lipsync CFGSounds entries? I did a search, and this was the closest thread to the subject I could find :j:

PS - I really don't feel like unpacking the game for the Single Player Campaign if I don't have to.

froggyluv
Aug 30 2009, 14:27
First you need the WaveToLip program http://tactical.nekromantix.com/tactical/wiki/doku.php?id=ofp:tools:ofpsoundlab

Place the file into your root directory, ie. 'C' Drive. Now you will be able to drop your wav. or ogg. files into it and a .lip file will come out matching your sound file. This program, WaveToLip is VERY picky and might seem like it's not working but you have to make sure the sound file is in Mono, and probably a certain frequency but honestly I don't remember what it was.

PhelanKA7
Sep 3 2009, 01:16
First you need the WaveToLip program http://tactical.nekromantix.com/tactical/wiki/doku.php?id=ofp:tools:ofpsoundlab

Place the file into your root directory, ie. 'C' Drive. Now you will be able to drop your wav. or ogg. files into it and a .lip file will come out matching your sound file. This program, WaveToLip is VERY picky and might seem like it's not working but you have to make sure the sound file is in Mono, and probably a certain frequency but honestly I don't remember what it was.

Do you just put the .lip file in the same directory as your sounds and it automatically picks it up, or is there a script command involved?

froggyluv
Sep 3 2009, 01:34
^
Plays it automatically with accompanying .ogg file.