Vehicle Sounds
by David Hassen · in Torque Game Engine · 06/17/2003 (4:46 am) · 8 replies
Hi, the included racing mod has no sounds.
I noticed this in car.cs
// Sounds
// jetSound = ScoutThrustSound;
// engineSound = ScoutEngineSound;
// squealSound = ScoutSquealSound;
// softImpactSound = SoftImpactSound;
// hardImpactSound = HardImpactSound;
// wheelImpactSound = WheelImpactSound;
// explosion = VehicleExplosion;
};
could some please help me out, I want to have sounds for the racing mod, as Iam making a racing type game.
Is there something I do to make the sounds work?
Thanks
David
I noticed this in car.cs
// Sounds
// jetSound = ScoutThrustSound;
// engineSound = ScoutEngineSound;
// squealSound = ScoutSquealSound;
// softImpactSound = SoftImpactSound;
// hardImpactSound = HardImpactSound;
// wheelImpactSound = WheelImpactSound;
// explosion = VehicleExplosion;
};
could some please help me out, I want to have sounds for the racing mod, as Iam making a racing type game.
Is there something I do to make the sounds work?
Thanks
David
About the author
#2
say, not a bad idea....email me here d_hassen@darkmoonsoftware.com, we talk it out.
06/17/2003 (5:37 am)
Hi, it does not seem to work, it compiled ok, I deleted all .dso, and ran the racing mod, no sound is played upon pressing up(accelerate).say, not a bad idea....email me here d_hassen@darkmoonsoftware.com, we talk it out.
#4
I want to edit the mod "racing" to have sounds. How do I do this?
I need to have idle sound, and engine sound, soft impact, ect.
06/17/2003 (6:39 am)
Hi, nope does not help, all my button sounds work, ingame music works ect. Ill try and explain more.I want to edit the mod "racing" to have sounds. How do I do this?
I need to have idle sound, and engine sound, soft impact, ect.
#5
like
AND your other sounds works as you said,
BUT you still dont have any vehicle sounds,
THEN I guess it's the bug I've mentioned ;)
06/17/2003 (7:10 am)
Well, if you DID uncomment those sounds// Sounds jetSound = ScoutThrustSound; engineSound = ScoutEngineSound; squealSound = ScoutSquealSound; softImpactSound = SoftImpactSound; hardImpactSound = HardImpactSound; wheelImpactSound = WheelImpactSound; explosion = VehicleExplosion;AND you have added the appropriate datablocks
like
datablock AudioProfile(ScoutThrustSound)
{
filename = "~/data/sound/zoom.wav";
description = AudioClose3d;
preload = true;
};to the file AND those files and paths are all valid (I *think* they have to be 22.5 kHz/mono, not sure atm. - try a button sound maybe which already works)AND your other sounds works as you said,
BUT you still dont have any vehicle sounds,
THEN I guess it's the bug I've mentioned ;)
#6
06/17/2003 (12:43 pm)
Check the console output for any errors; maybe it can't find the particular file you're using the vehicle, or it can't load it for some other reason.
#7
thanks
06/17/2003 (8:13 pm)
Hi, no console errors, maby Iam putting it in the wrong file, at the momment Iam putting the audio datablocks in car.cs, and where should I put the sound files, in /data/sounds in racing dir, or /data/sounds in fps dirthanks
#8
I put the description in quotes, but I don't know if that makes any difference. make sure all your filenames are correct, check the console again carefully, the filename problem I kept having was pointing it to ~/data/sound/ when my dir was named ~/data/sounds/ so becareful of things like that.
Missing files don't stop anything else running, just the sound won't turn up (there should me a grey note in the console though...)
make sure your exec ("./scripts/car.cs") is after exec ("./scripts/audioProfiles.cs")
not sure what else to try!
Good luck
06/17/2003 (8:50 pm)
I have sounds working fine with the racing scripts. The audio datablocks can go in car.cs no problem. if you're running the racing demo then put the sounds in racing/data/sounds dirI put the description in quotes, but I don't know if that makes any difference. make sure all your filenames are correct, check the console again carefully, the filename problem I kept having was pointing it to ~/data/sound/ when my dir was named ~/data/sounds/ so becareful of things like that.
Missing files don't stop anything else running, just the sound won't turn up (there should me a grey note in the console though...)
make sure your exec ("./scripts/car.cs") is after exec ("./scripts/audioProfiles.cs")
not sure what else to try!
Good luck
Torque Owner Alex \"bathala\" Rufon
Sounds are handled by declaring an AudioProfile datablock. Like so:
datablock AudioProfile(ScoutThrustSound) { filename = "~/data/sound/zoom.wav"; description = AudioClose3d; preload = true; };I believe that the audio profile this can be declared in any script file provided that it is executed first before it is referenced. The most logical is to put it on the same file as where it is reference (in your case in CAR.CS).
For more information ... you should review the file: torque/example/fps/server/scripts/player.cs
Alex
P.S.
btw, the game I'm working on will be using vehicles too (somewhat like Grand Theft Auto where you have both FPS and racing) ... want to collaborate? :)