Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
JakeWed

Playing a Radio In A Area

Recommended Posts

Ok, Yes I Have gone though with the Search Funtion, and Found a couple of Threads where nothing has Seamed to Work For me

Right Now I cant get the Music To Play Within a Area, I Have Gotten it to Play Globally though With the Use of the Say3D Command tried both in a Trigger and On a Object

Also If I want it to Only be in a Certain Area Should "Music" or "Sound" be Used (And I know Sound has to be Mono and Music Stereo)

Description.ext:

class CfgMusic
{

[indent]tracks[]={SovietRadio_1};

class SovietRadio_1
{
name = "Katyusha"; //The Name seen in the Editor
sound[] = {"\sound\katyusha.ogg", db-35, 1.0}; // The Pathway is Correct
};[/indent]


};

Share this post


Link to post
Share on other sites

Music - only "in ears", it can't be made to play spatial.

Sound - say/say3D makes mono files spatial, playSound can be used for stereo files but you loose spatial.

Sfx - has to be trigger and mono, and supports spatial, perfect loops, and randomized loop play over several sounds. Special case for addons defining ambient sound that can be stereo but are not spatial.

So, to have spatial (can pinpoint source by looking) you need mono sounds for say/say3D, or mono sfx for triggers. You cannot make a stereo sound spatial (but I hope Arma3 will get better stereo support).

Share this post


Link to post
Share on other sites

Ok, So Im On the Right Track with the Use of a "Sound" Instead Of "Music" As I Want it to Fade and Whatnot

But Theirs still the Problem of it not playing

SovietRadioPoint_1 say3D "katyusha";

This Code is Tried Both in a Tigger (DetectAnybody, Has Text Appear When Trigger Activated) and on a Object

Neither Seam to work

Share this post


Link to post
Share on other sites

sound[] = {"\sound\katyusha.ogg", [color="Red"]db-35[/color], 1.0}; // The Pathway is Correct

?

Share this post


Link to post
Share on other sites

Trying to Limit it to a Short Area, Yes I have Tried db+0 and db+20

Share this post


Link to post
Share on other sites

unfortunately thats how say, saysound, and the other various sound commands are set up. The actual function of the command has fixed parameters for amount of db to increase/decrease based on distance. However I have not tried using createSoundSource - it may be what your looking for, as it seems to be directed towards more ambient sounds that have a much shorter audible range.

Share this post


Link to post
Share on other sites

Just Looked Up CreateSoundSource, It seams its Dependent on a VehicleClass and yes it does Seam more for Stuff like Flocks of Animals etc.. But Could Work Very Nicely

Anyone got any Info on how To Set up a CfgVehicle Entry for a Sound Emmiting, Thing?

Share this post


Link to post
Share on other sites

Does CfgSFX work anymore? Couldn't get it working with custom sounds.

Share this post


Link to post
Share on other sites

Yes, cfgSFX still works, and I use it. But it has some weird issues (nothing's ever perfect), like stopping to work if you respawn in an area where you would hear it, but not always. Having a really hard time figuring out how these issues actually behave. One caveat though, is that if you create the trigger using a script using createTrigger, and setSoundEffect to set the sound parameters (like in a triggers effects lists), you need to use a dummy sound in the first slot even if the trigger sound is defined properly in the last slot (see the last example). The beauty of cfgSFX is that it allows perfect sounds loops, which none of the other can offer.

Example of use.

Description.ext:

class CfgSounds {
sounds[] = {};
class NoSound {name = "NoSound";sound[] = {"", 0, 1};titles[] = {};}; //Dummy sound needed for setSoundEffect command, due to stupid bug in engine.
};
class CfgSFX
{
sounds[] = {};
class fx_humming {name = "fx_humming";sounds[]={sound1};sound1[]={"sounds\fx_humming.ogg",1,1,50,1,0,0,0};empty[]= {"",0,0,0,0,0,0,0};}; //must be 22kHz mono fixed bitrate
};

Example code (probably needs rewrite to suit your own requirements):

	_trigger = createTrigger ["EmptyDetector", getPos player];
	_trigger setTriggerStatements ["true", "", ""];
	_trigger setSoundEffect ["NoSound", "", "", fx_humming];
	_trigger setTriggerText "fx_humming";

Here I use setTriggerText so that I can sort triggers later for deletion, rather than rely on trigger naming. Note that when using setSoundEffect you refer to the classname, whereas in the trigger dropdown list you pick the displayname (which can be localized). Here classname and name = are the same.

Maybe you should try with "" rather than "NoSound" first, to check if this bug is fixed now (I haven't tried).

The command createSoundSource does indeed rely on a cfgVehicle entry (sound objects), but suffers two problems:

1) Creates an addon dependency.

2) Doesn't support looped sounds perfectly.

Edited by CarlGustaffa

Share this post


Link to post
Share on other sites
Sign in to follow this  

×