Frictional Games Forum (read-only)

Full Version: music wont stop?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
StopMusic(float afFadeTime, int alPrio);



afFadeTime - time in seconds until music stops
alPrio - the priority of the music that should stop
(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.
StopMusic(0, 1);

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

still doesnt stop?
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);
}
(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
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);
}
(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
No problem Smile