Jump to content
Sign in to follow this  
MadMonk

Playing positional sound using playsound3D

Recommended Posts

I've been testing this arma 3 command out tonight but I cant seem to get any positional properties to the sound. Changing parameters, I can adjust frequency and volume but not the position. I wonder if this works only with 5.1 systems and not with two speakers.

Syntax:

playSound3D [filename, source, isInside, position, volume, frequency, distance]

Parameters:

[filename, source, isInside, position, volume, frequency, distance]: Array

filename: String

source: Object

isInside: Boolean

position: Position

volume: Number

frequency: Number

distance: Number - How far is sound audible (0 = no max distance).

playSound3D ["C:\Users\A\Documents\Arma 3 Alpha\missions\playsound.Stratis\Zevongrowling.wav", player] This works

playSound3D ["C:\Users\A\Documents\Arma 3 Alpha\missions\playsound.Stratis\Zevongrowling.wav", dogs, false, getPos dogs, 1, 1, 0]

dogs is another unit (actually a rabbit that I have named dogs) that i move around the player to test positional properties.

last value (max distance, 0 = no max, any other value here and there's no sound)

last but one, volume (anything over 1 doesnt work, 0.1 lowers volume considerably)

frequency alters pitch of the sound correctly.

I am not sure what the difference is between source and position parameters. Source must be an object or unit, so in the test I used a rabbit. Does this mean the source of the sound, if so, then

what is the position parameter.

Share this post


Link to post
Share on other sites

Just a note to correct the first playsound3D script example above, where I said that this works, what I meant was that it played the sound correctly but had no positional characteristics which I suppose would be correct since the location is the player. I've been looking into this command but the only info I can find is on the BIS wiki page.

What I'm hoping to do is to add some shouting and dog barking sounds to a mission but for them to be really authentic, the positional effect is key.

Edited by MadMonk

Share this post


Link to post
Share on other sites

Ive been trying out the say3D command, this seems to work perfectly. If anyones trying it, just pop the references to the sounds in the description.ext and play the sound on a trigger such as -:

rabbitDog say3D "growlSolo";

rabbitDog is a unit

class CfgSounds

{

// List of sounds (.ogg files without the .ogg extension)

sounds[] = {growlSolo,growlZevon};

// Definition for each sound

class growlSolo

{

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

sound[] = {\sounds\SoloGrowling.ogg, 1, 1.0};

titles[] = {};

};

class growlZevon

{

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

sound[] = {\sounds\Zevongrowling.ogg, 1, 1.0};

titles[] = {};

};

};

Share this post


Link to post
Share on other sites

I think this command is just not finished as Arma is in alpha. I tried to play it inside a moving helicopter and the sound cuts in its very beginning as if it was stuck in the same position even with the source argument. Also it is totally mono as it doesn't oscillate between the left and right speakers when you rotate your character.

---------- Post added at 04:34 AM ---------- Previous post was at 04:19 AM ----------

I just stumbled upon this command:

http://community.bistudio.com/wiki/createSoundSource

I don't know if it is related to playSound3d source parameter.

Share this post


Link to post
Share on other sites

try to use

playSound3D ["C:\Users\A\Documents\Arma 3 Alpha\missions\playsound.Stratis\Zevongrowling.wav ", dogs, false, [color="#FF0000"]([/color]getPos dogs[color="#FF0000"])[/color], 1, 1, 0]

Share this post


Link to post
Share on other sites

has anybody got this already working? maybe with relative paths?

Share this post


Link to post
Share on other sites
has anybody got this already working? maybe with relative paths?

I'm having the same problem, works fine with absolute path but any type of relative path I try just won't work, anyone got this working yet? Thanks in advance.

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  

×