Jump to content
TurtleBlaze420

playSound3D filename

Recommended Posts

I want to play a custom sound with playSound3D but I can't figure out what I have to set as the filename. Everything I tried so far didn't work.

 

The sound is defined in cfgSounds.hpp: 

class AirRaidSiren1
 
   {
        name = "AirRaidSiren1";
        sound[] = {"\overthrow_main\sounds\fx\AirRaidSiren1.ogg", 1, 1, 100 };
        titles[] = {};

    };

Share this post


Link to post
Share on other sites

Not sure what's the thing with arma and sound paths but I am using path like this and it works:

 

"@A3\Dubbing_Radio_F\sfx\radionoise1.ogg"

 

so try adding "@A3" to the path (If the sound file is in arma itself and not mod)

Share this post


Link to post
Share on other sites
On 9/26/2020 at 5:11 PM, gc8 said:

Not sure what's the thing with arma and sound paths but I am using path like this and it works:

 

"@A3\Dubbing_Radio_F\sfx\radionoise1.ogg"

 

so try adding "@A3" to the path (If the sound file is in arma itself and not mod)

Adding @A3 didn't work. It's a custom sound that I added in cfgSounds.hpp in the overthrow_main.pbo and the path to the sound file is "\overthrow_main\sounds\fx\AirRaidSiren1.ogg" but this path doesn't work with playSound3D.

Share this post


Link to post
Share on other sites

It's working now. Turns out when you add a sound to cfgSounds.hpp the first "\" in the sound's path is fine and the sound will work with e.g. playSound but if you use the same path with playSound3D it won't work unless you remove the first "\".

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

×