Lua Event for Target of target Change, Nameplate addon
TL/DR
I am looking for a Lua:Event that gets triggered when Target of target changes. What am I trying to achieve? I am making a UI that has no Unit Frames (edit: or action bars), only Nameplates. All the functionality I can get with WA and Nameplate addons. The only thing I'm missing is a Target of target indicator on my Target's nameplate. What have I tried so far? I have written a small addon that does show Target of target correctly. But it doesn't update whenever Target of target changes. I couldn't find the event that gets triggered by tot-change on Wowpedia or the forums. Here's the code I've got so far: Lua Code:
What are some alternative solutions to the problem? I know Plater can show target of a unit when casting, but I'd like to have it show tot at all times. TL/DR at the top of the post. |
UNIT_TARGET
Lua Code:
|
Quote:
The text on wiki is misleading. Quote:
Anyway, for the sake of completeness, here's the code I landed on. Lua Code:
NAME_PLATE_UNIT_ADDED is for when target nameplate appears as you target a unit or after. Btw, I don't know how to get a specific output from a function that outputs multiple values. If someone could tell me the syntax for that, it would be much appreciated. |
Any event starting with UNIT_ should work for any valid unitid.
Quote:
Code:
local arg1, arg2, arg3 = SomeFuncWith3Returns() |
Quote:
Thank you for all the help. |
All times are GMT -6. The time now is 07:52 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI