Author Topic: Music Script?  (Read 5637 times)

I was wondering if it would be possible to make a script that plays music (probably in .ogg format) depending on your location.  If it is possible, could someone make it?  It would be pretty awesome.

The "Depending on location" part, I'm not sure of. I should mess with the game more, but if you can't actually find the zone barriers, I'm sure you could hook into the centerprint or whatever saying you're somewhere new.

The "Depending on location" part, I'm not sure of. I should mess with the game more, but if you can't actually find the zone barriers, I'm sure you could hook into the centerprint or whatever saying you're somewhere new.
are you remaking AOT?

Already done it myself.

Code: [Select]
//music for age of time enhanced
//by shadow glitch

package musicchanger
{
function clientCmdCenterPrint(%x)
{
%m = stripMLControlChars(%x);
error(%m);
if(strstr(%m, "Wilderness") != -1)
{
alxStop($CurrentMusic);
$CurrentMusic = false;
CurrentMusic1.filename = "base/data/sound/music/wilderness.ogg";
$CurrentMusic = alxPlay("CurrentMusic1");
} else if(%m $= "Port Town" || %m $= "Starboard Town")
{
alxStop($CurrentMusic);
$CurrentMusic = false;
CurrentMusic1.filename = "base/data/sound/music/port.ogg";
$CurrentMusic = alxPlay("CurrentMusic1");
}
parent::clientcmdcenterprint(%x);
}
};
activatepackage(musicchanger);

if(isObject(CurrentMusicDesc)) CurrentMusicDesc.delete();

if(isObject(CurrentMusic1)) CurrentMusic1.delete();

new AudioDescription(CurrentMusicDesc) {
volume = 0.95;
isLooping = true;
is3D = false;
type = $DefaultAudioType;
};

new AudioProfile(CurrentMusic1) {
filename = "base/mod/sounds/1.ogg";
description = "CurrentMusicDesc";
preload = false;
};

If you don't understand it, don't bother with it.



Already done it myself.

Thanks, it works beautifully.  I think I may even know how to add my own conditions.

How's that government going?

Get with the times. The government idea died years ago.

Already done it myself.

Code: [Select]
//music for age of time enhanced
//by shadow glitch
Got yourself a new pseudonym there, or did you really just forget to remove the author's comment before plagiarizing his code?

Got yourself a new pseudonym there, or did you really just forget to remove the author's comment before plagiarizing his code?

I am Shadow Glitch. Get with the times.

If you don't believe me come on aot and ill login to it.

I apologize, I admit it is quite difficult to keep up with your numerous monikers

Get with the times. The government idea died years ago.

Your still a cigarettebag.



I thought you left AoT for good.

Hmmm... even though Jetz said you were someone called StiffMetal, I predict you are...

Skippy the Jedi Droid.

If it is then you have something big coming your way.

Btw, yes, I have left AoT for good.