Vehicle sound fx.
by Ferret · in Technical Issues · 07/10/2003 (12:37 pm) · 7 replies
Hi,
I'm trying to get sound fx working for a wheeled vehicle.
First i added a new audioType
$SoundfxAudioType = 6;
Then the description and profile
new AudioDescription(Soundfx)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = $SoundfxAudioType;
};
new AudioProfile(SoundfxEngine)
{
filename = "~/data/sound/testing.wav";
description = "Soundfx";
preload = true;
};
How do i trigger this sound when driving a vehicle?
Thx.
I'm trying to get sound fx working for a wheeled vehicle.
First i added a new audioType
$SoundfxAudioType = 6;
Then the description and profile
new AudioDescription(Soundfx)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = $SoundfxAudioType;
};
new AudioProfile(SoundfxEngine)
{
filename = "~/data/sound/testing.wav";
description = "Soundfx";
preload = true;
};
How do i trigger this sound when driving a vehicle?
Thx.
About the author
#2
Also tryed SoundfxEngine=engineSound, no error but still no engine sound.
Thx.
07/10/2003 (1:38 pm)
I tryed that before but i get an error "out of bound value" when loading the mission.Also tryed SoundfxEngine=engineSound, no error but still no engine sound.
Thx.
#3
Try 2, the SimObject Type.
07/10/2003 (1:57 pm)
That might have something to do with you using the number 6 for the type.Try 2, the SimObject Type.
#4
I placed the audioProfile in car.cs instead of audioprofiles.cs.
Thx for the help Anthony.
07/13/2003 (2:49 am)
Got it to work :)I placed the audioProfile in car.cs instead of audioprofiles.cs.
Thx for the help Anthony.
#5
DATABLOCK sounds are transmitted through the net.
DATABLOCK AudioDescription(AudioClosestLooping3d)
{
volume = 1.0;
isLooping= true;
is3D = true;
ReferenceDistance= 5.0;
MaxDistance= 30.0;
type = $SimAudioType;
};
DATABLOCK AudioProfile(SoundfxEngine)
{
filename = "~/data/sound/testing.wav";
description = "AudioClosestLooping3d";
preload = true;
};
Nicolas Buquet
09/11/2007 (9:02 am)
It's better with "DATABLOCK" instead of "NEW".DATABLOCK sounds are transmitted through the net.
DATABLOCK AudioDescription(AudioClosestLooping3d)
{
volume = 1.0;
isLooping= true;
is3D = true;
ReferenceDistance= 5.0;
MaxDistance= 30.0;
type = $SimAudioType;
};
DATABLOCK AudioProfile(SoundfxEngine)
{
filename = "~/data/sound/testing.wav";
description = "AudioClosestLooping3d";
preload = true;
};
Nicolas Buquet
#6
datablock AudioProfile(enginesoundprofile)
{
filename = "~/data/sound/my_sound_effects/carengineidle.ogg";
description = AudioLooping2D;
preload = true;
};
datablock WheeledVehicleTire( BoxCarTire )
{
shapeFile = "~/data/shapes/vehicles/boxwheeled/boxcartire.dts";
staticFriction = 10.0;
kineticFriction = 6.5;
longitudinalForce = 6000;
longitudinalDamping = 400;
longitudinalRelaxation = 1;
lateralForce = 6000;
lateralDamping = 400;
lateralRelaxation = 1;
};
datablock WheeledVehicleSpring( BoxCarSpring )
{
force = 3000;
damping = 600;
antiSwayForce = 1000;
length = 1;
};
datablock WheeledVehicleData(BoxCar)
{
category = "baseVehicles";
shapeFile = "~/data/shapes/vehicles/boxwheeled/boxcar3mtpoints.dts";//used to be boxcar.dts
emap = false;
mountable = true;
swappable = false;
mountPose[0] = "sitting";
mountPose[1] = "sitting";
mountPose[2] = "sitting";
numMountPoints = 3;//used to be 1
maxSteeringAngle = 0.785;
integration = 4;
mass = 200;
drag = 0.6;
bodyFriction = 0.6;
bodyRestitution = 0.4;
engineTorque = 5000;
engineBrake = 500;
brakeTorque = 2000;
maxWheelSpeed = 55;
cameraDefaultFov = 90.0;
cameraMinFov = 45.0;
cameraMaxFov = 120.0;
cameraMinDist = 45.0;
cameraMaxDist = 60.0;
observeThroughObject = true;
useEyePoint = false; //used to be false
minLookAngle = -1.57;
maxLookAngle = 1.57;
maxFreelookAngle = 2.1;
cameraOffset = 5.0;
minImpactSpeed = 1;
groundImpactMinSpeed = 100;
groundImpactShakeAmp = "1.0 1.0 1.0";
groundImpactShakeDuration = 0.1;
groundImpactShakeFalloff = 10.0;
groundImpactShakeFreq = "4.0 4.0 4.0";
jetSound = enginesoundprofile;
};
07/27/2008 (8:54 pm)
I am having problems getting my engineSound code to work as well. Here is my code:datablock AudioProfile(enginesoundprofile)
{
filename = "~/data/sound/my_sound_effects/carengineidle.ogg";
description = AudioLooping2D;
preload = true;
};
datablock WheeledVehicleTire( BoxCarTire )
{
shapeFile = "~/data/shapes/vehicles/boxwheeled/boxcartire.dts";
staticFriction = 10.0;
kineticFriction = 6.5;
longitudinalForce = 6000;
longitudinalDamping = 400;
longitudinalRelaxation = 1;
lateralForce = 6000;
lateralDamping = 400;
lateralRelaxation = 1;
};
datablock WheeledVehicleSpring( BoxCarSpring )
{
force = 3000;
damping = 600;
antiSwayForce = 1000;
length = 1;
};
datablock WheeledVehicleData(BoxCar)
{
category = "baseVehicles";
shapeFile = "~/data/shapes/vehicles/boxwheeled/boxcar3mtpoints.dts";//used to be boxcar.dts
emap = false;
mountable = true;
swappable = false;
mountPose[0] = "sitting";
mountPose[1] = "sitting";
mountPose[2] = "sitting";
numMountPoints = 3;//used to be 1
maxSteeringAngle = 0.785;
integration = 4;
mass = 200;
drag = 0.6;
bodyFriction = 0.6;
bodyRestitution = 0.4;
engineTorque = 5000;
engineBrake = 500;
brakeTorque = 2000;
maxWheelSpeed = 55;
cameraDefaultFov = 90.0;
cameraMinFov = 45.0;
cameraMaxFov = 120.0;
cameraMinDist = 45.0;
cameraMaxDist = 60.0;
observeThroughObject = true;
useEyePoint = false; //used to be false
minLookAngle = -1.57;
maxLookAngle = 1.57;
maxFreelookAngle = 2.1;
cameraOffset = 5.0;
minImpactSpeed = 1;
groundImpactMinSpeed = 100;
groundImpactShakeAmp = "1.0 1.0 1.0";
groundImpactShakeDuration = 0.1;
groundImpactShakeFalloff = 10.0;
groundImpactShakeFreq = "4.0 4.0 4.0";
jetSound = enginesoundprofile;
};
#7
using different types of audioDescriptions, amplifying the sound's volume in Audacity, trying to play sound effect files i know work in other places in code here - they don't work for jetSound either, changing jetSound to engineSound
What am I doing wrong?
07/27/2008 (8:57 pm)
I have tried everything I can think of. Using .wav instead of .ogg - that just causes a fatal error. using different types of audioDescriptions, amplifying the sound's volume in Audacity, trying to play sound effect files i know work in other places in code here - they don't work for jetSound either, changing jetSound to engineSound
What am I doing wrong?
Torque Owner Anthony McCrary
engineSound = SoundfxEngine;