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:
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. |
I wouldn't be able to tell you what's making it not work for you, 'cause it works just fine on my end. :s
|
You're trying to match first, then evaluate a string by itself.
lua Code:
should be lua Code:
|
So I've got the event working, and it send emotes to the error frame like it should, but i'm having issues filtering out ones targeting the player.
According to WoWprogramming CHAT_MSG_TEXT_EMOTE contains message, sender, language, channelstring, target ... but target returns a nil value no matter what emote is used. lua Code:
the print() should be giving me the emote message, the character sending it and the target, but that 'target' is always empty. |
Wowprogramming is outdated and not really being maintained anymore, from what I've been told. Wowpedia is the one you should be relying on.
That being said, Wowpedia doesn't show target as being one of the args, but it's possible that their info is incomplete. "target" seems to exist just fine for CHAT_MSG_EMOTE, but that doesn't really help with anything. I tried reading and printing all the args for CHAT_MSG_TEXT_EMOTE but none of them contain my target's name, so I guess it's just not there. If anything it might be worth reporting as a bug. |
All times are GMT -6. The time now is 10:13 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI