Backround music problem
by Don Weatherby · in Torque Game Engine · 10/02/2006 (2:05 pm) · 5 replies
Hi i went thru a old tutorial on how to add some backround music and i think i got it all right but the music wont play. I think this is the problem
it says in the tut. to put this in a mission file at the end of it. but i dont see how i could do that since non of the mission files are cs. and i cant modify them with visual C++
function handleLoadInfoDoneMessage( %msgType, %msgString )
{
// This will get called after the last description line is sent.
}
new AudioProfile(Mission_Music)
{
filename = "~/data/sound/music/pacedbeat.wav";
description = "AudioDefaultLoop";
preload = false;
};
any help would be very awsome and hope i can get this figured out =)
~Ryder~
it says in the tut. to put this in a mission file at the end of it. but i dont see how i could do that since non of the mission files are cs. and i cant modify them with visual C++
function handleLoadInfoDoneMessage( %msgType, %msgString )
{
// This will get called after the last description line is sent.
}
new AudioProfile(Mission_Music)
{
filename = "~/data/sound/music/pacedbeat.wav";
description = "AudioDefaultLoop";
preload = false;
};
any help would be very awsome and hope i can get this figured out =)
~Ryder~
About the author
#2
While I was going throgh 'The Game Programmer's Guide to Torque' - great resource! -
Anyway - this is what I ended up with in my environment file:
//in game music
datablock AudioDescription( InGameMusicDesc )
{
volumme = 1.0;
isLooping = true;
loopCount =-1;
is3D = false;
type = $GuiAudioType;
};
new AudioProfile( InGameMusicProfile )
{
fileName = "~/data/sound/yourmusicfile.wav";
description = InGameMusicDesc;
};
This works - only if I call alxPlay( InGameMusicProfile ); in my onMissionLoad function (in the game.cs file)
Hope this helps
10/02/2006 (2:22 pm)
I had a similar problem last night - While I was going throgh 'The Game Programmer's Guide to Torque' - great resource! -
Anyway - this is what I ended up with in my environment file:
//in game music
datablock AudioDescription( InGameMusicDesc )
{
volumme = 1.0;
isLooping = true;
loopCount =-1;
is3D = false;
type = $GuiAudioType;
};
new AudioProfile( InGameMusicProfile )
{
fileName = "~/data/sound/yourmusicfile.wav";
description = InGameMusicDesc;
};
This works - only if I call alxPlay( InGameMusicProfile ); in my onMissionLoad function (in the game.cs file)
Hope this helps
#3
thx man im gona check that out now hope this works =)
edit: thx for fast reply!
10/02/2006 (3:22 pm)
@samuel thx man im gona check that out now hope this works =)
edit: thx for fast reply!
#4
"
//in game music
datablock AudioDescription( InGameMusicDesc )
{
volumme = 1.0;
isLooping = true;
loopCount =-1;
is3D = false;
type = $GuiAudioType;
};
"
where is that located starter.fps/client/scripts/blah.cs?
wich cs file is it in? thx much!
ive seen tuts. and other resources trying to do this is in a audioprofile.cs but i know that there is 2 different audioprofile.cs files one in client side one in server. thx
havent figured it out yet
10/02/2006 (3:29 pm)
By the way you said "Anyway - this is what I ended up with in my environment file:""
//in game music
datablock AudioDescription( InGameMusicDesc )
{
volumme = 1.0;
isLooping = true;
loopCount =-1;
is3D = false;
type = $GuiAudioType;
};
"
where is that located starter.fps/client/scripts/blah.cs?
wich cs file is it in? thx much!
ive seen tuts. and other resources trying to do this is in a audioprofile.cs but i know that there is 2 different audioprofile.cs files one in client side one in server. thx
havent figured it out yet
#5
I posted the complete code for doing a splash screen music and how to turn it into ingame background music, in the audio forum. here--> www.garagegames.com/mg/forums/result.thread.php?qt=45488
10/02/2006 (3:46 pm)
The best place to put this is in server/scripts/audioProfiles.cs and call it in server/scripts/game.csI posted the complete code for doing a splash screen music and how to turn it into ingame background music, in the audio forum. here--> www.garagegames.com/mg/forums/result.thread.php?qt=45488
Torque Owner Fucifer