Detect when an music end.

Status
Not open for further replies.
Hello guys, have a question here, is possible to detect when a song end?

It is possible by launching a countdown timer once the music starts (That's if you play the music manually). The music list of Warcraft (If you don't play any) is totally random. (Afaik)
But notice that you can always clear music list :
Clear Music List
  • Sound - Clear the music list
And you can always use your own list and play music according to your own selection.

You should, by the way, stop the default music list entirely by this :
Stopping default music
  • Music stopper
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Sound - Stop music After fading
      • Sound - Stop the currently playing music theme
      • Sound - Clear the music list
 
You can create a custom music list using this:
call SetMapMusicRandomBJ( "Sound\\Music\\mp3Music\\PursuitTheme.mp3;ImportedMusic\\IntensityTheme.mp3")

Different songs is seperated by ;
This example shows a limited amount of ingame music and also your own custom imported music as long its mp3 format.

_________

As for detecting when a music ends is kinda hardcoded afaik and I don't know its possible with jass or triggers to detect exactly when it ends.

But maybe you can can use the GetLastPlayedMusic function running with periodic timer quite often to check approximately WHEN last played music ends and begins playing a new one. I haven't tried this but it should return a different string when it changes music by itself. This is the only method I can figure out is the closest. (I haven't tested this myself yet, so I don't know if this works.)
 
You can create a custom music list using this:
call SetMapMusicRandomBJ( "Sound\\Music\\mp3Music\\PursuitTheme.mp3;ImportedMusic\\IntensityTheme.mp3")

Different songs is seperated by ;
This example shows a limited amount of ingame music and also your own custom imported music as long its mp3 format.

_________

As for detecting when a music ends is kinda hardcoded afaik and I don't know its possible with jass or triggers to detect exactly when it ends.

But maybe you can can use the GetLastPlayedMusic function running with periodic timer quite often to check approximately WHEN last played music ends and begins playing a new one. I haven't tried this but it should return a different string when it changes music by itself. This is the only method I can figure out is the closest. (I haven't tested this myself yet, so I don't know if this works.)

That won't detect the last played music by default.

Look :
bP7SK.jpg
 
You can create a custom music list using this:
call SetMapMusicRandomBJ( "Sound\\Music\\mp3Music\\PursuitTheme.mp3;ImportedMusic\\IntensityTheme.mp3")

Different songs is seperated by ;
This example shows a limited amount of ingame music and also your own custom imported music as long its mp3 format.

_________

As for detecting when a music ends is kinda hardcoded afaik and I don't know its possible with jass or triggers to detect exactly when it ends.

But maybe you can can use the GetLastPlayedMusic function running with periodic timer quite often to check approximately WHEN last played music ends and begins playing a new one. I haven't tried this but it should return a different string when it changes music by itself. This is the only method I can figure out is the closest. (I haven't tested this myself yet, so I don't know if this works.)
That Solved my problem :) Thanks
 
Status
Not open for further replies.
Back
Top