Author Topic: Background audio files  (Read 1850 times)

I want to code some background audio files that play for everyone in the server. The audio files will be clientside, but I want to have a code like the joinServer sound that plays for everyone. I would just copy and paste that script and try to figured it out, but Game.cs is a dso. Plz halp.


You could do something like this, I suppose:

Code: [Select]
package Music
{
   function GameConnection::onClientEnterGame(%this)
   {
      Parent::onClientEnterGame(%this);
      %this.play2D(AUDIOPROFILE);
   }
};
activatePackage(Music);

Thank you very much. I'll try this out.

I'd only work if they had music download on, unless they already had the sound file, from a map, Add-On, or game itself

Bump.

You could do something like this, I suppose:

Code: [Select]
package Music
{
   function GameConnection::onClientEnterGame(%this)
   {
      Parent::onClientEnterGame(%this);
      %this.play2D(AUDIOPROFILE);
   }
};
activatePackage(Music);
Would that just be for mono OGG's?


EDIT: Here's my script and it's not working.
Code: [Select]
package Music
{
   function GameConnection::onClientEnterGame(%this)
   {
      Parent::onClientEnterGame(%this);
      %this.play2D(BGM_Stress);
   }
};
activatePackage(Music);

datablock AudioProfile(BGM_Stress)
{
   filename    = "base/data/sound/music/Stress.OGG";
   preload = true;
};
« Last Edit: July 08, 2007, 11:29:25 PM by -Koden- »

You could do something like this, I suppose:

Code: [Select]
package Music
{
   function GameConnection::onClientEnterGame(%this)
   {
      Parent::onClientEnterGame(%this);
      %this.play2D(AUDIOPROFILE);
   }
};
activatePackage(Music);
Alright, thank you very much. I made a few modifications to the script, but it now works. This thing is awesome.