Author Topic: Audio Profile Problems (need help)  (Read 5340 times)

So here I am trying to make audio profiles for my sounds like so:

datablock AudioDescription(LongRange3d : AudioClose3d)
{
   maxDistance = 100;
   referenceDistance = 25;
};

Then I implement it into the sounds.cs script like so:

datablock AudioProfile(Scream1)
{
   fileName = "./SCREAMS/BF3_US_DEATH_1.wav";
   description = LongRange3d; <------ remember this? ^
   preload = true;
};

So yea I start my game and my yells wont work, I check the log and it says this:

Object 'LongRange3d' is not a member of the 'AudioDescription' data block class

TBH I don't know what I did wrong, I made a separate SoundDesc.cs that has the audio description inside

And yes I did execute it in the script.cs D:< so guys,

WTF GIVES???? Any idea on how to correct the audio description?

Does AudioClose3D exist? Are your sounds in mono correctly?

yes they are in mono I don't know how you could forget that up considering it only takes a click to do so

and yes AudioClose3d does exist as you can tell ^

Which is defined first?

LongShot3d is defined first


im assuming at least, look this is my fist time making an audio profile so just help me out

I think the problem is you're trying to do Datablock AudioDescription when I'm pretty sure it's New AudioDescription

Edit:

Now I'm really sure, because I use this on some client code:
Code: [Select]
new AudioDescription(ABC_MusicProfile2D)
{
     is3D = false;
     isLooping = false;
     type = 8;
};
« Last Edit: July 29, 2014, 10:07:31 PM by Thorfin25 »

I think the problem is you're trying to do Datablock AudioDescription when I'm pretty sure it's New AudioDescription

Edit:

Now I'm really sure, because I use this on some client code:
Code: [Select]
new AudioDescription(ABC_MusicProfile2D)
{
     is3D = false;
     isLooping = false;
     type = 8;
};
oooooh ok I see. and one more question. How can set a custom range such as a range farther then AudioDefault? just do what I did above? maxDistance = 100 referenceDistance = 50?

No idea, I say test it out.

alright thank you for the help

the problem returns:

Code: [Select]
new AudioDescription(LongRange3d)
{
maxDistance = 180;
referenceDistance = 40;
is3d = true;
isLooping = false;
type = 8;
};

and I still get the same thing in the log:
Longrange is not a datablock...

Maybe it's best to use a default description then?

but i really want to create a sound profile to increase the range at where you hear gun shot noises etc, Zloff did it...

Maybe descriptions are purely client-side? Try defining it in a client add-on and testing again.