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 wont stop?
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#1
music wont stop?

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?
(This post was last modified: 04-02-2012, 12:31 PM by zombiehacker595.)
04-02-2012, 09:22 AM
Find Reply
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: music wont stop?

StopMusic(float afFadeTime, int alPrio);



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

(This post was last modified: 04-02-2012, 09:26 AM by flamez3.)
04-02-2012, 09:26 AM
Find Reply
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#3
RE: music wont 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.
04-02-2012, 09:37 AM
Find Reply
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: music wont stop?

StopMusic(0, 1);

04-02-2012, 09:42 AM
Find Reply
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#5
RE: music wont stop?


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

still doesnt stop?
04-02-2012, 10:20 AM
Find Reply
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#6
RE: music wont 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);
}

When Life No Longer Exists
Full-conversion mod
(This post was last modified: 04-02-2012, 11:23 AM by Unearthlybrutal.)
04-02-2012, 11:22 AM
Website Find Reply
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#7
RE: music wont stop?

(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
04-02-2012, 11:40 AM
Find Reply
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#8
RE: music wont stop?

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);
}

When Life No Longer Exists
Full-conversion mod
(This post was last modified: 04-02-2012, 11:49 AM by Unearthlybrutal.)
04-02-2012, 11:48 AM
Website Find Reply
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#9
RE: music wont stop?

(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
04-02-2012, 12:16 PM
Find Reply
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#10
RE: music wont stop?

No problem Smile

When Life No Longer Exists
Full-conversion mod
04-02-2012, 12:31 PM
Website Find Reply




Users browsing this thread: 1 Guest(s)