Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Music Script Help
KHShox Offline
Junior Member

Posts: 28
Threads: 11
Joined: Apr 2011
Reputation: 0
#1
Music Script Help

Alright here is the 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?

[Image: bf3_sig-1298673357.jpg]
(This post was last modified: 04-19-2011, 12:14 AM by KHShox.)
04-18-2011, 11:12 PM
Find
Dalroc Offline
Member

Posts: 57
Threads: 2
Joined: Mar 2011
Reputation: 0
#2
RE: Music Script Help

Remove the void OnStart() in the beginning Smile
04-18-2011, 11:56 PM
Find
KHShox Offline
Junior Member

Posts: 28
Threads: 11
Joined: Apr 2011
Reputation: 0
#3
RE: Music Script Help

(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.

[Image: bf3_sig-1298673357.jpg]
04-19-2011, 12:14 AM
Find
Kurton Offline
Senior Member

Posts: 533
Threads: 8
Joined: Oct 2010
Reputation: 16
#4
RE: Music Script Help

"mozart_music" needs the .ogg extension.

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

(This post was last modified: 04-19-2011, 03:35 AM by Kurton.)
04-19-2011, 03:31 AM
Find




Users browsing this thread: 1 Guest(s)