Jump to content
Sign in to follow this  
malkekoen

Say command plays sound globally, not locally?

Recommended Posts

As the title says... And yes, the sound files are mono, 44100 Khz .ogg files.

I even imported BIS sounds to test (renamed them as to fit in my description.ext and editor) and they also play globally.

Anyone know what I missed?

This is the sound in my description.ext:

    class talk1_1
{
	name = "talk1_1"; // Name for mission editor
	sound[] = {\sounds\talk1_1.ogg, db+10, 1.0};
	titles[] = {0,""};
};

It is called through a script:

if (alive Unit1) then {
Unit1 say "talk1_1";
};

And I tried everything from adding the say command directly to the unit, or through triggers, and it plays fine, but globally.

Again I'm positive that the sound files are mono, and I double checked with BIS files that do work locally normally, but the also play globally here.

Share this post


Link to post
Share on other sites

probably your script is launcher globally and therefore executed everywhere. This applies to triggers, init fields, etc.

Try

hint "test";

And see if all players will see this. If they will then you have your script running on all machines.

(Or I missed something and say\say3D are global by default)

Edited by SaMatra

Share this post


Link to post
Share on other sites

SaMatra:

Yes the script is global, I call it from a trigger. But the Say command should be local, as far as I can tell. Should place the sound on the unit speaking, according to this http://community.bistudio.com/wiki/say

If I make a hint in the script it should be visible to all, but the sound not, as I use "say". The importamt thing, as far as I can tell, is to make sure that the sound file is mono, otherwise it plays as global. (it is mono).

Horner:

I want a unit to say the sound, I even have .lip files and they're working fine. Moving mouth and the sound plays, just global.

Share this post


Link to post
Share on other sites

To get it to play globally you'd run it from a trigger (which would run it locally on all clients) or use some other method ala variables or CBA functions or RE to get it to execute locally, globally.

Share this post


Link to post
Share on other sites
To get it to play globally you'd run it from a trigger (which would run it locally on all clients) or use some other method ala variables or CBA functions or RE to get it to execute locally, globally.

Sorry I'm not sure I totally understand. Just to make it clear, this is just a SP mission, and the script, which executes the say command, is called by a function or a trigger, I have tried both. But I can't see how calling the script makes a difference, as I just want 1 unit to say something that is not audible on the entire map, but placed locally on that unit.

Share this post


Link to post
Share on other sites

Oh. If this is SP, what do you call local?

You mean, in space?

In which case you might wanna use say3D.

Share this post


Link to post
Share on other sites

If it's SP what's the problem and why do you care about local/global, everything will be local. Guess I have no idea what your problem is. When you say "globally" do you mean "sounds like it's everywhere" instead of "sounds like it's coming from a specific object"?

Share this post


Link to post
Share on other sites
If it's SP what's the problem and why do you care about local/global, everything will be local. Guess I have no idea what your problem is. When you say "globally" do you mean "sounds like it's everywhere" instead of "sounds like it's coming from a specific object"?

Sorry for not being clear, I am not so used to programming and it's terms.

I mean the sounds play global, ie.: it is everywhere on the map, where I would like it to play locally, ie.: To make it sound like a unit says something with 3D effects and distance fading.

BlackMamb: I didn't know there was a command called say3D. It's not described in the wiki, but I'll try.

Share this post


Link to post
Share on other sites

hi,

This is the sound in my description.ext:

    class talk1_1
{
	name = "talk1_1"; // Name for mission editor
	sound[] = {\sounds\talk1_1.ogg, db+10, 1.0};
	titles[] = {0,""};
};

Your problem is here db+10. The sound is played too loud. Try with db-10, if it still too loud decrease the volume again.

I also suggest you to edit your sound file in a sound editor and decrease the volume from here. It will save a bit of size too.

If it still doesn't work there's a work around

if ((alive Unit1) AND (Unit1 distance player<50)) then {
Unit1 say "talk1_1";
};

Change the distance for what you need.

EDIT: Maybe something a bit more performance friendly (not sure about the synthax):

if (alive Unit1) then {if (Unit1 distance player<50) then {
Unit1 say "talk1_1"}};
};

cya.

Nikiller.

Edited by Nikiller

Share this post


Link to post
Share on other sites

Hey Nikiller,

That was the solution, the db+10.

It was apparently too loud for Arma, after setting -20 theres definetly a 3d sound (local) effect. Thanks, I just felt i needed to boost the recording since it was quite low, but it's fine.

Thanks for all your help guys!

Share this post


Link to post
Share on other sites

Just for information:

It seems you can add a third parameter in the CfgSounds.

class talk1_1
{
	name = "talk1_1"; // Name for mission editor
	sound[] = {\sounds\talk1_1.ogg, db+10, 1.0, [color="#FF0000"]100[/color]};
	titles[] = {0,""};
};

This would be the radius in which the sound can be heard.

Share this post


Link to post
Share on other sites

Gives me an idea. Add a small herd of goats, but make it so one of the goats can talk, but randomly, and make him still sound like a goat. Record a few growly voice files. Make the goat say3D something like, "Behhh, behhh, damnit this grass tastes terrible, behh, behh". Or make it so the cows sound like chickens and chickens sound like frogs.

Share this post


Link to post
Share on other sites
Gives me an idea. Add a small herd of goats, but make it so one of the goats can talk, but randomly, and make him still sound like a goat. Record a few growly voice files. Make the goat say3D something like, "Behhh, behhh, damnit this grass tastes terrible, behh, behh". Or make it so the cows sound like chickens and chickens sound like frogs.

I'll get that mission, for sure! Why not make them speak like real englishmen, discussing the state of the Empire over a glass over sherry.

BlackMamb:

Thanks, very helpful!

Edited by malkekoen
Spelling

Share this post


Link to post
Share on other sites

I use the following command server side to have it heard on all clients (incl server):

[nil,unit1,rSAY,"talk1_1"] call RE;

For the actual say description if I want it to sound direction I do this:

class talk1_1

{

name = "talk1_1"; // Name for mission editor

sound[] = {\sounds\talk1_1.ogg, db+10, 1.0, 0.15};

titles[] = {0,""};

};

0.15 makes it sound like its coming from a particular direction and will not be heard further away.

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  

×