Frictional Games Forum (read-only)

Full Version: Few questions about putting music in my maps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I put music in my map, but it wont stop, if Grunt or Brute comes around. It won't stop, if I exit the map to the main menu, but only if I close the whole game. What should I do?
How did you put music in your map?
Code:
void OnStart()
{
PlayMusic("10_amb.ogg", true, 100, 3, 0, false);
}
I was unable to duplicate your issue on my system.
If you still have this problem, you should change the "0" to "1".

alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - highest, 1 - lower, etc


So if it's 0 then this music has the highest priority in the game, which means no other music will play.
Or change it to even lower priority than 1, maybe 4-5 just to be sure that "Background" music has lowest priority, in case a monster spawn for example.
Actually with music it is only thing what is wrong in wiki.

0 is highest priority with sounds. It only applies to sound.

In music it is opposite, bigger the number, bigger priority it has Smile