> cdTrack = "2"; --->> musicTrack = "lush"; What is this and "> Playing music in a mission | Torque Game Engine | Forums | Community | GarageGames.com

Game Development Community

Playing music in a mission

by Pascal Trahan · in Torque Game Engine · 12/03/2003 (8:45 am) · 3 replies

In the current HEAD, is there support for playing music in a mission? In the mission file, there is this entry:

new SimGroup(MissionGroup) {
CTF_scoreLimit = "5";

--->> cdTrack = "2";
--->> musicTrack = "lush";

What is this and how can we use it?

#1
12/03/2003 (8:52 am)
Pascal,

The ogg vorbis streaming code is in the current HEAD.
I do not believe torque supports cd music though...

Anyway, make sure you have an audiodescription :

new AudioDescription(AudioMusic)
{
   volume   = 1.0;
   isLooping = false;
   isStreaming = true;
   is3D     = false;
   type     = $DefaultAudioType;
};

A profile for the music :

new AudioProfile (myMusic)
{
	filename = "myOggFile.ogg";
	description="AudioMusic";
	preload=true;
}

And finally, whenever you want to play / stop :

myMusicHandle = alxPlay(myMusic); // Starts
alxStop(myMusicHandle); // Stops
#2
12/03/2003 (10:30 am)
Thanks a lot! Where should I put this code so the music starts playing as soon as the client enters the mission?
#3
12/03/2003 (12:56 pm)
Ok, I managed to set it up... thanks for this information :)