Comrades in Arms Discussion Board

Full Version: playsound3d, say3d
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I am trying to play music in vehicle and also through radio(speakers) for 1 of my missions, tried a couple ways with no joy.

1. added script to init of unit; playsound3d  ["music1\acdc.ogg",radio,true,getposasl radio,1,1,25] didn't work

2. added via trigger on act;jeep playsound3d  ["music1\acdc.ogg",radio,true,getposasl radio,1,1,25]

tried a few variations too, say3d etc nothing working for me

can anyone help?
my description.ext reads as follows and has always worked for my

class CfgMusic
{
tracks[]={};

class music1
{
name = "music1";
sound[] = {"\music\acdc.ogg", db+10, 1.0};
};
okay can see that is incorrect looking back at my 1st post

["music1\acdc.ogg",radio,true,getposasl radio,1,1,25

as doesn't match the same path, but I have had this all correct, I have just been messing around and is different now
Check the command description in BI wiki

https://community.bistudio.com/wiki/playSound3D

There is section about custom sounds. It takes a bit of extra work. Also take note on top of the screen. Arguments/effects are both global, which means it happens in every computer in network. I don't know how it really works with the sounds, but I would first try to play this on server only, and see if it works. Otherwise, when multiplied by, for example 16 players, effects can be exotic.

Thanks Stag, looks like there are a few reports of it being broken, so will not spend too much time worrying on that. However I am thinking if I move one of my music tracks to sounds, and then play this through a trigger/effects/voice I should get a proximity sound ??
Scratch that ! doesn't work, group song it is
What exactly is 'group song'? A custom audio that is meant to be played for a specific group only?
Hey stig I didn't mean it like that, more so map wide song for all parties, basically noob way of doing it  Wink
Make sure you have CfgSounds defined in your description.ext without typos, missing , ; or brackets. Example below: Make folder to your mission folder called sounds. Put your audio there, make sure your audio files are in .ogg format.

Code:
class CfgSounds {

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

If you want that sound to be played to everyone:

Code:
playSound "mySound";

in a script, or execution field of a trigger.

https://community.bistudio.com/wiki/Description.ext
https://community.bistudio.com/wiki/playSound
I did it with Say3D and worked well. Just define the sound with empty string for the message (as above) and you can use it. A bit more work if you want to play it looped - I did it via a repeating trigger, with a boolean variable in its condition. On activation play the sound, set the variable to false and wait some time until the sound is fully played. Then, in the trigger deactivated section, set the variable back to true, so that the trigger triggers itself again.
Thanks suchy will take another look