Introduction music won't stop - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Introduction music won't stop (/thread-16514.html) |
Introduction music won't stop - MaZiCUT - 06-26-2012 As the title says, i'm a big phat phony who's stuck again. void OnStart() { FadeOut(0); AddTimer("", 4, "intro1"); AddEntityCollideCallback("Player", "WakeUpSpeech", "WakeUpSpeechFunc", true, 1); } void intro1(string &in asTimer) { SetMessage("Messages", "Introtext1", 5); AddTimer("", 6, "intro2"); PlayMusic("Introduction.ogg", true, 1.0f, 0, 0, true); } void intro2(string &in asTimer) { SetMessage("Messages", "Introtext2", 5); AddTimer("", 6, "intro3"); } void intro3(string &in asTimer) { FadeIn(2); AddTimer("", 1, "musicstart"); } void musicstart(float afFadeTime, int alPrio) { AddTimer("", 4, "ambientstart"); PlayMusic("Ambient_Ghost.ogg",true,1,0,0,false); StopMusic(0, 0); } void ambientstart(string &in asParent, string &in asChild, int alState) { SetEntityActive("WakeUpSpeech", true); } void WakeUpSpeechFunc(string &in asChild, string &in asParent, int alState) { AddEffectVoice("ItsQuiet.ogg","","Voice","ItsQuiet",false,"",0,10); } RE: Introduction music won't stop - Cruzore - 06-26-2012 void musicstart(float afFadeTime, int alPrio) wrong callback syntax, it's void MyFunc(string &in asTimer) Edit: PlayMusic("Ambient_Ghost.ogg",true,1,0,0,false); It has the same priority, so it will either bug out or won't play at all, since priority 0 is stopped right after. Better change it RE: Introduction music won't stop - MaZiCUT - 06-26-2012 Thank you dear sir, it is working. |