Frictional Games Forum (read-only)
Custom Music - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Custom Music (/thread-7405.html)

Pages: 1 2


Custom Music - KHShox - 04-16-2011

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.


RE: Custom Music - Tanshaydar - 04-16-2011

Do not make a special folder, use the same layout as game's.


RE: Custom Music - KHShox - 04-16-2011

Music still doesn't play.


RE: Custom Music - Tanshaydar - 04-16-2011

You have right code, don't you?


RE: Custom Music - KHShox - 04-16-2011

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);
}



RE: Custom Music - Tanshaydar - 04-16-2011

Remove '.ogg'


RE: Custom Music - Anxt - 04-16-2011

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.


RE: Custom Music - ferryadams10 - 04-18-2011

that doesn't matter anxt i've got on my music the priority on 100Tongue


RE: Custom Music - PvtLastClass - 04-18-2011

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.


RE: Custom Music - nkmol - 04-18-2011

its working proberly when you play it whith a ogg-player? (like footbar2000)