Adding backgroun music
by Tim Lei · in Torque Game Engine · 05/03/2002 (3:37 pm) · 5 replies
How can I add background music during a mission?
Thanks for all your replies!
Thanks for all your replies!
#2
Link to Desmond's sound tutorial site.
05/03/2002 (4:10 pm)
http://holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/Link to Desmond's sound tutorial site.
#3
05/05/2002 (11:45 am)
oops - never mind .. right reply , wrong thread :-)
#4
And then you can call it e.g. in client\init.cs
05/05/2002 (11:51 am)
I've included Kurt's great Ogg Vorbis code for Torque... and it does work to play it at startup, in the menus, during missing loading, etc.! You just have to define datablocks like this:new AudioProfile(MainMenu_Music) {
fileName = "~/data/sound/music/Track09.ogg";
description = "AudioMusic";
preload = "0";
};e.g. in "mainMenuGui.gui".And then you can call it e.g. in client\init.cs
function loadMainMenu()
{
// Startup the client with the Main menu...
Canvas.setContent( MainMenuGui );
Canvas.setCursor("DefaultCursor");
alxPLay("MainMenu_Music");
}Haven't tried it with normal sound, though...
#5
05/05/2002 (6:44 pm)
thanx alot pal, works!
Torque 3D Owner Gareth Davies
The discussion of it and the code is Here