Jump to content
Sign in to follow this  
Azza FHI

How to play sound files from an external source (.pbo)

Recommended Posts

Hey ive searched high an low for this and have tried the following inside the mission's description.ext (they are separate examples, didn't try them both at the same time)

class CfgSounds {

class track1
  {
       name = "track1";
       sound[] = {"soundtest\2.wss", db+1, 1}; 
titles[] = {};
   };


};

class CfgSounds {

class track1
  {
       name = "track1";
       sound[] = {"soundtest\1.ogg", db+1, 1}; 
titles[] = {};
   };


};

have also tried with \ infront of soundtest. soundtest is the name of the pbo which is loaded separate to the default addons folder. there are no subfolders in it, just 1 wss and 1 ogg.

cannot get any sounds to work with playsound, is the path wrong or am I missing something?

overall goal is to have our dedicated server running some extra music pbos which can be played to the clients without the clients running the pbos or being included in the mission folder.

thanks for any help

Share this post


Link to post
Share on other sites

class CfgSounds {

class track1
  {
       name = "track1";
       sound[] = {"\soundtest\2.wss", 1, 1}; 
   titles[] = {};
   };


};

class CfgSounds {

class track1
  {
       name = "track1";
       sound[] = {"\soundtest\1.ogg", 1, 1}; 
   titles[] = {};
   };


};

I would have thought this would do the trick. Not sure the dB setting works for cfgsounds.

Also, playsound can sometimes seem a bit fickle. The way you've set your config, you'd have to play the sounds with playsound "track1" and playsound "track2". playsound track1 and playsound track2 won't work.

Edited by tpw

Share this post


Link to post
Share on other sites

this also works..

MISSION_ROOT = call { 
private "_arr"; 
_arr = toArray str missionConfigFile; 
_arr resize (count _arr - 15); 
toString _arr 
};

playSound3D [MISSION_ROOT + "yourSoundsFolder\yourSound.ogg", _SoundSource, _isInside, _SoundPos, _SoundVolume, _SoundPitch, _SoundDistance];	

Share this post


Link to post
Share on other sites

Hey,

Say I have multiple sounds for the one event e.g.

Seagull1.wav , Seagull2.wav, Seagull3.wav

Do I need to have a class for each sound or can I put them in the one class and ArmA 3 will be able to randomly pick one?

A code example would be appreciated.

Thanks

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  

×