[AddOn] API PlayMusic() & StopMusic()
Posted: Sun May 29, 2016 4:54 pm
I'm trying to create an addon that plays a list of musics on the background of the game but if I do:
The music also loops when it gets to the end and I haven't find a way (a event) to know when the music ends or anything at all...
I tried to use:
So, is there any way to correctly use the StopMusic() to change from one music to the next one or maybe use PlayMusic() on top. A hard way to do it (that I'm not sure if it's possible) if there's no solution, is to make a timer and after x seconds, change the music. There's no events to this working on Vanilla!
- Code: Select all
PlayMusic("path1")
PlayMusic("path2")
The music also loops when it gets to the end and I haven't find a way (a event) to know when the music ends or anything at all...
I tried to use:
- Code: Select all
StopMusic()
So, is there any way to correctly use the StopMusic() to change from one music to the next one or maybe use PlayMusic() on top. A hard way to do it (that I'm not sure if it's possible) if there's no solution, is to make a timer and after x seconds, change the music. There's no events to this working on Vanilla!