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
How to stop music when going next level on door?
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#3
RE: How to stop music when going next level on door?

(07-10-2011, 10:11 AM)TFEF Wrote: StopMusic(float afFadeTime, int alPrio);

To stop the music. Put that in the .hps of the map that has the music you want to stop when you leave.

Then just add a PlayMusic on the next map. Or set the new map's music to a higher priority.

Not working this is my script:

Forbidden cellar hps. map file:

void MusicControl2(string &in asParent, string &in asChild, int alState)
{
PlayMusic("You Only Live Once.ogg", false, 3, 3, 10, true);
StopMusic(2, 0);
}

Undead house map hps. map file:

void MusicControl(string &in asParent, string &in asChild, int alState)
{
if(alState == 1) PlayMusic("Requim For A Dream.ogg", true, 1.0f, 0, 0, true);
if(alState == -1) StopMusic(2, 0);
}

Still playing when i exit the next map Sad


“Life is a game, play it”
(This post was last modified: 07-10-2011, 10:18 AM by HumiliatioN.)
07-10-2011, 10:18 AM
Find


Messages In This Thread
RE: How to stop music when going next level on door? - by HumiliatioN - 07-10-2011, 10:18 AM



Users browsing this thread: 1 Guest(s)