Frictional Games Forum (read-only)
music wont 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: music wont stop? (/thread-14431.html)



music wont stop? - zombiehacker595 - 04-02-2012

FadeOut(0);
FadeIn(15);
PlayMusic("10_amb.ogg", true, 1, 1, 0, true);
AddPlayerSanity(25);

i added this in and the music just wont stop it has stayed on for over 3 maps and even when i went through a script area which has another sound and damges your sanity it still played how would i change this for it to only play for like 15 seconds?



RE: music wont stop? - flamez3 - 04-02-2012

StopMusic(float afFadeTime, int alPrio);



afFadeTime - time in seconds until music stops
alPrio - the priority of the music that should stop


RE: music wont stop? - zombiehacker595 - 04-02-2012

(04-02-2012, 09:26 AM)flamez3 Wrote: StopMusic(float afFadeTime, int alPrio);



afFadeTime - time in seconds until music stops
alPrio - the priority of the music that should stop


yea i dont quite understand that.


RE: music wont stop? - flamez3 - 04-02-2012

StopMusic(0, 1);


RE: music wont stop? - zombiehacker595 - 04-02-2012


FadeOut(0);
FadeIn(15);
PlayMusic("10_amb.ogg", true, 1, 1, 0, true);
StopMusic(0, 1);
AddPlayerSanity(25);

still doesnt stop?



RE: music wont stop? - Unearthlybrutal - 04-02-2012

void something(?)
{
FadeOut(0);
FadeIn(15);
PlayMusic("10_amb.ogg", true, 1, 1, 0, true);
AddPlayerSanity(25);
AddTimer("stop", 15.0, "Stop");
}

void Stop(string &in asTimer)
{
StopMusic(0.0f, 0);
}


RE: music wont stop? - zombiehacker595 - 04-02-2012

(04-02-2012, 11:22 AM)Unearthlybrutal Wrote: void something(?)
{
FadeOut(0);
FadeIn(15);
PlayMusic("10_amb.ogg", true, 1, 1, 0, true);
AddPlayerSanity(25);
AddTimer("stop", 15.0, "Stop");
}

void Stop(string &in asTimer)
{
StopMusic(0.0f, 0);
}


still didnt work Sad


RE: music wont stop? - Unearthlybrutal - 04-02-2012

void something(?)
{
FadeOut(0);
FadeIn(15);
PlayMusic("10_amb.ogg", false, 1, 1, 1, false);
AddPlayerSanity(25);
AddTimer("stop", 15.0f, "Stop");
}

void Stop(string &in asTimer)
{
StopMusic(0.1f, 1);
}


RE: music wont stop? - zombiehacker595 - 04-02-2012

(04-02-2012, 11:48 AM)Unearthlybrutal Wrote: void something(?)
{
FadeOut(0);
FadeIn(15);
PlayMusic("10_amb.ogg", false, 1, 1, 1, false);
AddPlayerSanity(25);
AddTimer("stop", 15.0f, "Stop");
}

void Stop(string &in asTimer)
{
StopMusic(0.1f, 1);
}


aha there we go it stoped after about 10 seconds exactly what i wanted thanks Smile


RE: music wont stop? - Unearthlybrutal - 04-02-2012

No problem Smile