#Who targeting me?

12 messages · Page 1 of 1 (latest)

coral zealot
#

Who targeting me?

vast plover
#

you need code for that

#

on FRAME_UPDATE, throttled to whatever, you iterate over all nameplates and check if their target is you

#

when you have any unit Id, then appending target is a reference to the unit they're targeting

#

so nameplate4target is what nameplate 4 is targeting

#

so e.g.

for i = 1, 40 do
  local unit = "nameplate" .. i
  if UnitIsUnit(unit  .. "target", "player") then
    -- do something
  end
end
#

-- do something could be creating one state per unit targeting you. set unit = unit and then you can use %unit formatting for %unit in the display tab and it gives you the char name with class colouring etc.

#

!tsu

lusty stagBOT
glacial lark
#

(that requires you to enable friendly nameplates)

potent aspen
#

i think i got it worked with chatgpt - im testing it and adding some features

#

pretty cool tbh