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
StrartMusic Work But not Stop
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#10
RE: StrartMusic Work But not Stop

void PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);

Plays music.

asMusicFile - the music to play + extension .ogg
abLoop - determines whether a music track should loop
afVolume - volume of the music
afFadeTime - time in seconds until music reaches full volume
alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - lowest, >0 - higher

void StopMusic(float afFadeTime, int alPrio);

Stops music.

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

So, all the pink stuff needs to be the same if you want to stop the music. I would either put StopMusic in OnLeave() in the current map, or in OnEnter() in the next map.

PlayMusic("Music_file_name.ogg", true, 1.0f, 0, 0, true);
StopMusic(0, 0);
02-28-2012, 06:44 AM
Website Find


Messages In This Thread
StrartMusic Work But not Stop - by jessehmusic - 02-27-2012, 06:59 PM
RE: StrartMusic Work But not Stop - by Mackiiboy - 02-28-2012, 06:44 AM



Users browsing this thread: 1 Guest(s)