View Single Post
11-15-17, 03:50 AM   #1
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Sending emotes targeting player to screen

So, I've noticed this is something Prat used to do, but it no longer works(I personally couldn't get it to work, but name-pop ups did), but my chat addon I've made is decidedly more simplistic than prat, and I find the code hard to cipher through to figure out how to implement it in mine..

I've attempted to do this myself with no luck, and I honestly can't figure out why.
I have this function
lua Code:
  1. local function scrollingEmotes(self, event, message, ...)
  2.    if event == "CHAT_MSG_TEXT_EMOTE" or "CHAT_MSG_EMOTE" then
  3.       UIErrorsFrame:AddMessage(message)
  4.       print("Test of Emote Event")
  5.    end
  6. end
  7.  
  8. local a = CreateFrame("Frame")
  9.  a:RegisterEvent("CHAT_MSG_TEXT_EMOTE")
  10.  a:RegisterEvent("CHAT_MSG_EMOTE")
  11.  a:SetScript("OnEvent", scrollingEmotes)

It's event handler code I successfully use in other parts of my UI addon, but for some reason, it's simply not working here, and I don't know why. I get no errors, but when I see an emote, I get neither the debug message nor the emote printed to the UIErrors frame.
__________________
My Addons | "If someone says something is impossible, they lack either imagination, or determination."

Last edited by Joker119 : 11-15-17 at 04:10 AM.
  Reply With Quote