i've been using music bricks now
there's an option for music bricks to turn off it's "3D" so that the music stays the same where ever you are
but the problem is that, when that is done, you can hear the music
everywhere in the server (which is usually really good!)
but i want the music to be hearable only when you're in range
is there a way?
//server.cs
datablock AudioDescription(AudioBackMusicLooping : AudioMusicLooping3d)
{
maxDistance = 50; //note: if i wanted it to affect the whole server, just change it to 9999999 or something.
referenceDistance = 2;
is3D = 0;
};
datablock fxDtsBrickData(brickBackMusicData : brickMusicData)
{
uiName = "Back Music";
musicRange = 50;
musicDescription = AudioBackMusicLooping;
//is3D = 0;
};
exec("./Support_backmusicbricks.cs");
//support_backmusicbricks
if(isObject(MissionMusic))
return;
brickMusicData.musicRange = 30;
brickMusicData.musicDescripti on = AudioMusicLooping3d;
package customrangebackmusic
{
function fxDtsBrick::setSound(%this,%music,%client)
{
if(isObject(%this.audioEmitter))
%this.audioEmitter.delete();
if(!%music || %music == -1)
return 1;
%this.audioEmitter = new AudioEmitter()
{
position = %this.position;
rotation = "1 0 0 0";
scale = "1 1 1";
profile = %music;
useProfileDescription = "0";
description = %this.dataBlock.musicDescription;
type = "0";
volume = "1";
outsideAmbient = "1";
referenceDistance = "2"; //from what blueblur and chrono said, this is the "earrape distance".
maxDistance = %this.dataBlock.musicRange;
isLooping = "1";
loopCount = "-1";
minLoopGap = "0";
maxLoopGap = "0";
enableVisualFeedback = "1";
is3D = "%this.dataBlock.is3D;";
//i don't want any change in audio. i think this is what controls it. //okay yeah i dunno
coneInsideAngle = "360";
coneOutsideAngle = "360";
coneOutsideVolume = "1";
coneVector = "0 1 0";
};
}
};
activatePackage(customrangebackmusic);