Game Development Community

Multiplayer Mission Music?

by Stefan Beffy Moises · in Torque Game Engine · 07/07/2002 (10:42 pm) · 8 replies

Hi again,
I've got another multiplayer problem... :-(
I'm using background music for a level, and everything's fine in Singleplayer... I simply start the music in "common/client/mission.cs", clientCmdMissionStart(%seq) like this:
function clientCmdMissionStart(%seq)
{
   // The client recieves a mission start right before
   // being dropped into the game.
   // play background music
   alxStop($mainMenuMusicHandle);
   $missionMusicHandle = alxPLay("Mission_Music");
}
but again, this only works for the client actually *hosting* the game, all the others don't hear music...

I thought it has to be the right place, cause in the same file I found this:
function clientCmdMissionEnd(%seq)
{
   // Recieved when the current mission is ended.
   alxStopAll();
any ideas?? Thanks!

#1
07/07/2002 (10:44 pm)
Forgot to mention that the AudioProfile is in the mission (.mis) file...
new AudioProfile(Mission_Music) {
      fileName = "~/data/sound/music/Track10.ogg";
      description = "AudioMusic";
      preload = "0";
   };
... may that be the problem?
#2
07/08/2002 (11:28 am)
When you say "hosting", you do mean that you're starting a dedicated server?
#3
07/08/2002 (1:17 pm)
Nope, not dedicated, simply turning on Multiplayer mode and let other clients join my game... but only I hear the music...
#4
07/08/2002 (3:58 pm)
Is the Ogg file on all the clients as well? I worked on this before the net download stuff got added, so I'm not sure if it will send the music file to the clients.
#5
07/08/2002 (10:00 pm)
Hm, but the other clients have the .ogg file, it works for them in singleplayer, too .... maybe I should try to get a standard WAV file playing...
Anybody else got experience with background music in multiplayer??
Kurtis, would it be a problem to add network download support for OGGs?
Thanks!
#6
07/09/2002 (5:49 am)
I am using the fmod tutorial, I get mp3 playing everywhere.

So, no, I don't have that problem.
#7
07/09/2002 (5:51 am)
Ed, where did you put the call to "alxPlay()" for your music? Do you use globals like "$mainMenuMusic", too?
#8
12/23/2002 (4:44 am)
Isn't all the required code there already? All you need to do is add a line like

musicTrack = "(profilename)";

into the .mis file. It only works if you put it right into the MissionGroup, though, not into the MissionInfo where it at first appears to belong.