Frictional Games Forum (read-only)

Full Version: Custom Music
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How could I add custom music? I already have downloaded a piece, converted it to .ogg, and I made a special folder for it in my map, and in the default Amnesia music folder, it doesn't play.
Do not make a special folder, use the same layout as game's.
Music still doesn't play.
You have right code, don't you?
Yep
Code:
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

////////////////////////////
// Run first time starting map
void OnStart()
{
    AddEntityCollideCallback("Player", "Doorclose", "Doorclose", true, 1);
}


    void Doorclose(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorClosed("mansion_1", true, true);
    SetSwingDoorLocked("mansion_1", true, true);
    GiveSanityDamage(2, true);
    PlayMusic("mozart_music.ogg", false, 0.7f, 0, 10, false);
}
Remove '.ogg'
Your priority is also 10. If there is any other music playing with a lower priority numerically (such as 0,1, or anything up to 9) it will not play over the music that is already there.
that doesn't matter anxt i've got on my music the priority on 100Tongue
I think what anxt is saying is that it will play lower-numbers first (0, 1) and higher numbers last (100). So I think they would have things like 0 for monster-chasing terror, 1 for monster-present hiding, then say 5 for gentle room ambience.

I'm not a modder, so that's just how I read it.
its working proberly when you play it whith a ogg-player? (like footbar2000)
Pages: 1 2