[Request] random deathlog alert sounds
aaronma37 opened this issue ยท 2 comments
Edit the Deathlog\Widgets\DeathAlert\widget.lua
With this, the .lua needs 2 sound lists, the first one for the sounds played normally, and the second for the randomised sounds list.
in the : local sounds = sound list
sounds["-random-"] = "empty"
just before : if deathlog_settings[widget_name]["alert_sound"] == "default_hardcore" then
if deathlog_settings[widget_name]["alert_sound"] == "-random-" then
PlayRandomSound()
else
PlaySoundFile(sounds[deathlog_settings[widget_name]["alert_sound"]])
end
at the very end of the file
function PlayRandomSound()
local soundFiles = {
"Interface\\AddOns\\Deathlog\\Sounds\\sound1.ogg",
add all the files you want, respect the syntax
}
local randomIndex = math.random(1, #soundFiles)
local soundPath = soundFiles[randomIndex]
PlaySoundFile(soundPath)
end
Hope you're enjoy like I do, with a good sound playlist, the DeathAlert become really fun.