Hey i want to stop the Outside-Mood-music, when i'm entering a building so i decided to add 2 areas. The one area stops the music and the other start it again, when your leaving the building.. everything works except the area, which should start the music again.
The Area which starts the music again
The Area which stops the music
Here is the script
Quote:void OnStart()
{
//Stops WindMood
AddEntityCollideCallback("Player" , "StopMusic" , "Stop" , true , 1);
//Starts WindMood
AddEntityCollideCallback("Player" , "PlayMusic" , "Play" , true , 1);
}
//Starts WindMood
void Play(string &in asParent, string &in asChild, int alState)
{
PlayMusic("WindMood.ogg", true, 1, 3, 1, true);
}
//Stops WindMood
void Stop(string &in asParent, string &in asChild, int alState)
{
StopMusic(1, 1);
}
//The first time, where the music starts.
void Teleport(string &in asParent, string &in asChild, int alState)
{
FadeRadialBlurTo(25, 0.0f);
FadeOut(2);
ChangeMap("01_traum.map", "TeleportSpawn", "", "");
StopMusic(2, 1);
PlayMusic("WindMood.ogg", true, 1, 3, 1, true);
}