Originally Posted by Stonedpossum
Gah! Ok, I have,
Code:
local frame= CreateFrame("Frame")
frame:RegisterEvent("PLAYER_AURAS_CHANGED")
frame:SetScript("OnEvent", function(frame)
local t = 0
frame:SetScript("OnUpdate", function(_, elapsed)
t = t + elapsed
if t >= 1 then
frame:SetScript("OnUpdate", nil)
if IsMounted() then
PlayMusic("Interface\\AddOns\\OnTheRoad\\music.mp3")
else
StopMusic()
end
end
end)
But it still doesn't even work.
|
put
Code:
DEFAULT_CHAT_FRAME:AddMessage("Stopping music")
after StopMusic() to find out if its IsMounted() and
Code:
DEFAULT_CHAT_FRAME:AddMessage("Playing music")
after PlayMusic() then try mounting up. If you see Playing music printed then it means PlayMusic() is failing else its IsMounted try playing around with the value in
.
Is Music enabled, in the sound options? And does <Your addon> appear in the addon list?