zombiehacker595
Member
Posts: 141
Threads: 51
Joined: Mar 2012
Reputation:
3
|
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?
|
|
04-02-2012, 09:22 AM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
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 |
|
zombiehacker595
Member
Posts: 141
Threads: 51
Joined: Mar 2012
Reputation:
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 |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: music wont stop?
StopMusic(0, 1);
|
|
04-02-2012, 09:42 AM |
|
zombiehacker595
Member
Posts: 141
Threads: 51
Joined: Mar 2012
Reputation:
3
|
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 |
|
Unearthlybrutal
Posting Freak
Posts: 775
Threads: 12
Joined: May 2011
Reputation:
26
|
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);
}
|
|
04-02-2012, 11:22 AM |
|
zombiehacker595
Member
Posts: 141
Threads: 51
Joined: Mar 2012
Reputation:
3
|
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
|
|
04-02-2012, 11:40 AM |
|
Unearthlybrutal
Posting Freak
Posts: 775
Threads: 12
Joined: May 2011
Reputation:
26
|
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);
}
|
|
04-02-2012, 11:48 AM |
|
zombiehacker595
Member
Posts: 141
Threads: 51
Joined: Mar 2012
Reputation:
3
|
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
|
|
04-02-2012, 12:16 PM |
|
Unearthlybrutal
Posting Freak
Posts: 775
Threads: 12
Joined: May 2011
Reputation:
26
|
RE: music wont stop?
No problem
|
|
04-02-2012, 12:31 PM |
|
|