Home   Help Search Login Register  

Author Topic: say "sound" is not working in my mission  (Read 1361 times)

0 Members and 3 Guests are viewing this topic.

Offline dr. seltsam

  • Members
  • *
say "sound" is not working in my mission
« on: 06 Jul 2008, 20:52:47 »
hello,

i am running here into a few problems with the "say" command. I have an empty cessna on my map, and i want it to produce a sound that simulates a motor on high rpm. My description:

Code: [Select]
//Sounds
class CfgSounds
{

sounds[] = {Tracker,Tracker_2,Nitro_T};

class Tracker
{
name = "Tracker";
sound[] = {"Tracker.ogg",db+4,1};
titles[] = {};
};

class Tracker_2
{
name = "Tracker_2";
sound[] = {"Tracker_2.ogg",db+4,1};
titles[] = {};
};

class Nitro_T
{
name = "Nitro_T";
sound[] = {"Nitro_T.ogg",db+0,1};
titles[] = {};
};

};


Nitro_T is the sound i want. Then i use the command:

Code: [Select]
cessna say "Nitro_T"

... nothing happens!   >:(   
The command "playSound" would play this sound without problems, but i need the sound in relation to the distance.
Maybe i am totally stupid, but i have not the slightest idea what's going wrong. I already used this command in another mission (another sound) with success, and i cannot see what is false here. Any help is appreciated.  :D

Offline Gcfungus

  • Members
  • *
Re: say "sound" is not working in my mission
« Reply #1 on: 06 Jul 2008, 22:16:57 »
These description.exts are confusing to me, but I think your problem could be that inanimate objects (non humans) cannot 'say' anything. If you tried to get a guy to 'say' it, it would probably work.
Just some thoughts. :)
-=GC=-Fungus1999
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline Cheetah

  • Former Staff
  • ****
Re: say "sound" is not working in my mission
« Reply #2 on: 06 Jul 2008, 23:21:50 »
What you want to use is a gamelogic to say things for you. These can actually say things although they are 'ghosts'. So place a game logic, name it and place it anywhere you want to create nice sound effects for your missions.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: say "sound" is not working in my mission
« Reply #3 on: 07 Jul 2008, 14:14:51 »
Max,
You do not need a gamelogic. I used say to make my klr's say a nitro sound in my missions. The only thing that will not say is a dead unit(tested) [and perhaps static class objects(untested)]. Try increasing the db value.

What happens when you have the cessna say one of those other sounds? Do you hear it?
« Last Edit: 07 Jul 2008, 14:17:24 by Mr.Peanut »
urp!

Offline dr. seltsam

  • Members
  • *
Re: say "sound" is not working in my mission
« Reply #4 on: 07 Jul 2008, 22:19:31 »
Thanks for all the suggestions... :)

@ Mr. Peanut:

I have one of your missions unPBO'ed here on my HD. I looked at your nitro.sqs, and description.ext to learn, how this can be realized. I will use only a totally simplified once-available-boost for my cessna.  :D

Anyway, i fixed that  - say "sound" - now by myself. Guess what...
... the say command by using .ogg file format works only for mono sounds!

Here is what i found out about .ogg files in OFP:

playMusic "music"                  --> works for stereo and mono
playSound "sound"                 --> stereo or mono is possible
say "sound"                          --> works only in mono

Maybe this can help other mapmakers, who have trouble with the sound files and the - say - command.
 :cool2:


Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: say "sound" is not working in my mission
« Reply #5 on: 08 Jul 2008, 01:30:28 »
Max,
That fact that ogg must be mono for say is in two different sound tutorials in the ED!  :shhh:
urp!

Offline dr. seltsam

  • Members
  • *
Re: say "sound" is not working in my mission
« Reply #6 on: 08 Jul 2008, 22:03:38 »
Yaa, i have them now.  :-[  :-[

It is often so attractive to copy and paste stuff without thinking.
 :whistle: