Get the Desktop App for Battle.net Now
- All your games in 1 place
- Log in once
- Automatic game updates
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.
Threats of violence. We take these seriously and will alert the proper authorities.
Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.
Harassing or discriminatory language. This will not be tolerated.