WoWInterface - View Single Post - Sound when pet dies
View Single Post
04-30-21, 12:36 PM   #7
A Molten Giant
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 578
Originally Posted by Yukka View Post
Oh nice I didnt saw it, thanks.
My pet was killed by the dummy at Boralus and there was a coin sound.
UI_LEGENDARY_LOOT_TOAST is a nice sound.

Edit: I changed the sound and deleted f:RegisterUnitEvent("UNIT_PET", "player") because this part plays the sound a second time when I use the Revive Pet ability. Just f:RegisterUnitEvent("UNIT_HEALTH", "pet") is enough.
You are not limited to that soundkit constant table. If you want to explore all of the possible sound IDs, you can browse https://www.wowhead.com/sounds and use the number in the URL for the sound page. For example, the "level up" sound is at https://www.wowhead.com/sound=888/levelup. The number in the URL is 888 so you would use PlaySound(888) to play it.

Examples I use for some stuff is PlaySound(23331) which has a few random "engineering doodad" fun sounds. I also use the old major/minor glyph sounds for special events PlaySoundFile(567404)PlaySoundFile(567487) I don't remember which one is which, but played together, they sound great.

Notice how those last two say "PlaySoundFile" instead. Sound IDs, which PlaySound uses, are basically indexes to a scripted table of sounds, some going to single sounds, others going to a group of randomly played sounds. File IDs, however, correlate directly to a file. File IDs are a little more tricky to get if you don't know what you're doing. wow.tools is one of the best tools available. That specific link takes you to the main sound table for the game. Searching names or IDs gets you File IDs in the FileDataID columns.

Going back to that engineering doodad ID, let's search for that. Now we know that ID plays one of five random sounds.

Last edited by Kanegasi : 04-30-21 at 01:11 PM.
  Reply With Quote