Main Menu music won't stop playing
by Thomas Shaw · in Torque Game Engine · 07/02/2005 (3:06 pm) · 2 replies
The code
The Audio Datablock (which shouldn't have anything to do with this)
So when I join a game, it keeps playing the song, and cancels the song I have running in-game.
function MainMenuGui::onWake(%this)
{
alxPlay(MainMenuMusic);
}
function MainMenuGui::onSleep(%this)
{
alxStop(MainMenuMusic);
}The Audio Datablock (which shouldn't have anything to do with this)
new AudioDescription(AudioMusic)
{
volume = 2.0;
isLooping = true;
isStreaming = true;
is3D = false;
type = $SimAudioType;
};
new AudioProfile(MainMenuMusic)
{
filename = "~/data/sound/music/main_menu.ogg";
description = "AudioMusic";
preload = false;
};So when I join a game, it keeps playing the song, and cancels the song I have running in-game.
Torque 3D Owner Billy L
function MainMenuGui::onWake(%this) { $musichandle =alxPlay(MainMenuMusic); } function MainMenuGui::onSleep(%this) { alxStop($musichandle); }