Frictional Games Forum (read-only)

Full Version: Music Loops
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone,

im having a little problem.. when i start a new game with my mod..i dont got any problems.. when i enter another map nothing happens.. but if i exit the game.. the music keeps playing.. if i enter another custom story.. it still keeps playing... now i tryed some codes.. but it didnt work.. anyone can help me out? here is the script.

void OnStart()
{

PlayMusic("entrance_1.ogg", true, 80, 1, 0, false);
}

void OnLeave()
{
}


what can i add so it wont continue when i go back to the menu!

Wretic.
Have you tried to stop the music when you leave the level? You can just do PlayMusic again on the second level...
I didn't quite understand your problem. Lol
(03-11-2012, 04:47 PM)Mehis Wrote: [ -> ]Have you tried to stop the music when you leave the level? You can just do PlayMusic again on the second level...
I didn't quite understand your problem. Lol
Done that .. my problem is.. when i exit a level.. for example.. i want to do a different Custom Story.. the music just keeps playing.. so have to know how i can stop it..


void OnLeave()
{
StopMusic(4, 0);
}