I know that this is bare minimum functionality at the moment, just trying to see if I can create something simple at first. The goal is to play a sound when a friend says something in chat.
You'll see I have a message in the chat window, just for testing purposes. The test message works, but the sound doesn't play (and I've tried different sounds). What am I conceptually missing?
Code:
ChatAlert = {}
function ChatAlert.init(eventCode, addOnName)
if addOnName ~= "ChatAlert" then
return
end
d("ChatAlert loaded")
ZO_ChatSystem_AddEventHandler(EVENT_CHAT_MESSAGE_CHANNEL, ChatAlert.handleChat)
end
function ChatAlert.handleChat(messageType, fromName, text)
if IsFriend(fromName) then
PlaySound(SOUNDS.VOLUME_DING_VO)
d("Messag received")
end
end
EVENT_MANAGER:RegisterForEvent("ChatAlert", EVENT_ADD_ON_LOADED, ChatAlert.init)
Edit: nevermind, figured it out. VOLUME_DING_VO apparently is not actually an audible sound...