Hello guys, have a question here, is possible to detect when a song end?, i mean in warcraft 3 are standart music that are automaticaly changed when one end, so is there a way to detect when a track end?
Hello guys, have a question here, is possible to detect when a song end?
Clear Music List
Sound - Clear the music list
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
call SetMapMusicRandomBJ( "Sound\\Music\\mp3Music\\PursuitTheme.mp3;ImportedMusic\\IntensityTheme.mp3")
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 theGetLastPlayedMusic
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.)
GetSoundIsPlaying
.If you are using sounds instead of music, you can also useGetSoundIsPlaying
.
That Solved my problemYou 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 theGetLastPlayedMusic
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.)