Frictional Games Forum (read-only)

Full Version: Music Script Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright here is the code
Code:
////////////////////////////////
///Run when entering map
void OnEnter()
{
AddTimer("FadeIntro", 0, "FadeIntro");
StopMusic(23,0);
}

void FadeIntro(string &in asTimer)
{
FadeOut(0);
FadeIn(6);
}

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

}

////////////////////////////
// Run first time starting map
void OnStart()
{
    PlayMusic("mozart_music", true, 0.7f, 1, 0, true);
    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);
}
It just won't play.
I have the music file EVERYWHERE. Is there anything wrong with this script?
Remove the void OnStart() in the beginning Smile
(04-18-2011, 11:56 PM)Dalroc Wrote: [ -> ]Remove the void OnStart() in the beginning Smile

Woops, that wasn't in the original script. Lol, but it still doesn't work.
"mozart_music" needs the .ogg extension.

EDIT: Whoops, just tested this in my own map, and it actually doesn't... o.O (Sorry :X)