Random Level Up Theme Addon

UI and Macro
Hey, folks. I'm thinking about writing up an add-on that plays one of three level up tunes at a time. Making an addon to play just one sound file is pretty easy. My question is... what do I have to do to make it play one of those three files?
You'll want to put the paths to the three files in an array-style table then use the math.random function to choose a random one. Use PlaySoundFile to play the sound.

If you want an example of this, I've just made the gist below. If you'd rather figure it out yourself, you can simply ignore the gist.


Join the Conversation

Return to Forum