Game Development Community

Object 'ocean' is not a member of the 'AudioProfile' data block class

by Lord Tony · in Technical Issues · 09/10/2011 (3:12 pm) · 2 replies

I'm trying to get sounds to work in my map and it keeps telling me ocean is not a member of the audioprofile class.

"*** Stage 2 load
Executing Add-Ons/Map_Island/Island9.mis.
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class
Object 'ocean' is not a member of the 'AudioProfile' data block class"

My code:
"datablock AudioProfile(ocean)
{
filename = "./ocean.wav";
description = AudioDefaultLooping3d;
preload =true;
};
datablock AudioProfile(seagulls)
{
filename = "./seagulls.wav";
description = AudioDefaultLooping3d;
preload =true;
};"

#1
09/10/2011 (6:26 pm)
From the examples in "fps example/art/datablocks/audioProfiles.cs"

datablock SFXProfile(ThrowSnd)
{
   filename = "art/sound/throw";
   description = AudioClose3d;
   preload = false;
};

This should get you on the right track. :-)
By the way, which engine are you using? That's really important as 2d and 3d may have differences. (I don't use torque 2d)
#2
09/10/2011 (10:27 pm)
That won't work because my map is packaged differently.