Jump to content
Sign in to follow this  
pebcak

Say / PlaySound

Recommended Posts

As per BI wiki:

unit say [sound, maxTitlesDistance, speed]

and:

playSound name

Information contained within is a little confusing. What's the difference between the two?

As a point of context, if I wanted a custom sound to be played so that all players (MP - obviously) can hear it clearly once triggered, which one, or what, should I use?

Share this post


Link to post
Share on other sites

Say is for localized sounds, something generating a sound. Playsound is just to play a sound like music.

Share this post


Link to post
Share on other sites

Yup, I use say for custom soundeffects. I think theyneed to be in mono, and will give a directional clue. Playsound I believe can be stereo but remains the same when you turn around, no doppler effect etc. However, I rarely use playsound.

But can someone answer me why it is so damned hard to get custom sounds to work properly? The trigger works, and the sound sometimes plays and sometimes not. So the sound "format" is okay (ogg). But somehow the engine simply *refuses* to do what it's told sad_o.gif Unpacking pbo's, I often see soundfiles in a completely unknown (to me) format. I thought ogg was to be used icon_rolleyes.gif

I was planning to use some cool alarm sounds, but it feels I'm stuck with that horrible bell or cheezy other alarm - yuck...

I use the FDF soundpackage in case it should matter, but I can't live without it now smile_o.gif

Am I doing something wrong, or is the engine having some known problems I'm unaware about?

I haven't had any problems with custom tunes though.

Share this post


Link to post
Share on other sites

"Say" is used commonly for stuff you actually want the soldiers to "SAY", not just some sound effect like "playsound"

WHen you have a soldier "say" a file, like "singthis.ogg" for example, if there's an accomping "LIP" file (singthis.lip), the soldiers lips will literally "say" it.

You can learn about WAV, LIP and OGG by using the "search" function here.

"Say" files generally need to be mono, as the LIP files need them that way when created anyway.

(Search: wav2lip)

Share this post


Link to post
Share on other sites

Okay, but if I want a sound to be heard by all players, no matter where they are in the game world - a custom radio message for example - what should I use?  'playSound name'? Clearly, not interested in having the sound directional or be affected by doppler effect.

Share this post


Link to post
Share on other sites

I'd try the globalRadio or groupRadio commands, although I've never played with those (yet). My voice "acting" makes texted radio messages my only choice tounge2.gif

Share this post


Link to post
Share on other sites

I think the Biki has enough information to compare the two, did you read both descriptions and the notes?

Share this post


Link to post
Share on other sites

Yes, but it's still not clear which of the two, if either, will play the sound so that all players can hear it no matter where they are in proximity to another player / trigger / whatever.

I'm not sure that the xRadio commands will do what I want as they seem to have to originate from a specific player as well.

Share this post


Link to post
Share on other sites
Yes, but it's still not clear which of the two, if either, will play the sound so that all players can hear it no matter where they are in proximity to another player / trigger / whatever.

I'm not sure that the xRadio commands will do what I want as they seem to have to originate from a specific player as well.

It is clear if you understand the concept of locality. In MP, both of these commands are local. Depending on from where you execute the code, either some, all, or no players will be able to hear it. If used in any init fields, waypoints, or triggers you create in the mission editor, or any other global space, the effect will be executed seperately on each client (the players who are connected to the server), meaning on each player's computer the sound will be played locally (meaning its effects are not distributed/syncronized among the other clients) at the position of the player (that means the player who is local to that client). In other words, every person who has the command executed on their computer will hear it's effects (given the command's conditions are also met, like with the say command and the distance of the observer from the source). It is possible for the command to be only executed on one or several specific clients, in which case only those specific players will notice the effects. So, to make sure you run the command globally (on everyone's computer) you must make sure the command is called from global space (ex: anything in the mission editor interface is all global). To make your life easier, it's vital for any MP editing/scripting that you understand locality, and for this I can only point you to the Biki though I'm not sure how well it's covered there.

Share this post


Link to post
Share on other sites

Kyle,

Ah! I see. It was the term Player that was confusing me. I was assuming that it refered to a single player amongst all, not Player as being the player local to the client. wink_o.gif

Thanks for taking the time to explain that. Now, at least, I know what I should be searching for. *bow*

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  

×