Jump to content
Sign in to follow this  
lgbainbridge

Custom Sound Source

Recommended Posts

Is there a way to create a custom sound source from a .wav or other file and have it available in the sound source option panel? Currently I have to play the sound using a trigger, I would like to make it a sound source.

I realize there is a createSoundSource.

I am trying to use it in the with a "present" trigger activated by "BLUEFOR" in following way:

mosque_1_sound = createSoundSource ["prayercall_02", position mosque_1, [], 100]

there is a mosque on my map named "mosque_1" and I defined "prayercall_02" in the description.ext file in the following way:

description.ext:

class cfgSounds

{

sounds[]={};

class prayercall_02

{

name = "prayercall_02";

sound[] = {\sounds\call_to_prayer_02.wav", 2, 1};

titles[] = {};

};

};

I get the following error on mission load:

No entry 'bin\config.bin/CfgVehicles.prayercall_02'.

I know the sound works, I have used it with the playSound command in a trigger. If anyone could let me know what file to put this in to create a sound source that is NOT based on a trigger I would appreciate it. Should it be in the mission.sqf file? of some other one?lgbainbridge

Share this post


Link to post
Share on other sites

I think we need to name the file in the clause sounds.

Check this:

class cfgSounds
{
sounds[]={prayercall_02};
class prayercall_02
{
name = "prayercall_02";
sound[] = {\sounds\call_to_prayer_02.wav", 2, 1};
titles[] = {};
};
};

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  

×