Game Development Community

Sound problem

by Steve D · in Torque Game Engine · 04/01/2007 (3:01 pm) · 2 replies

I'm trying to get a sound to play when a weapon fires. Here is the audio block I have -

datablock AudioProfile(PistolShot)
{
filename = "~/data/sound/laser1.ogg";
description = AudioDefault3d;
preload = true;
};

When I start up the game I get this error in the console - "Object 'AudioDefault3d' is not a member of the 'audiodescription' data block class"

Any ideas? I also tried AudioClose3d but get the same error.

#1
04/01/2007 (5:22 pm)
Do you have 1 of these in your scripts

datablock AudioDescription(AudioDefault3d)
{
volume = 1.0;
isLooping= false;

is3D = true;
ReferenceDistance= 20.0;
MaxDistance= 100.0;
type = $SimAudioType;
};

quoted from fps starter kit
#2
04/01/2007 (7:05 pm)
No but that's probably what's wrong, didn't even know that, thanks!