Hey anyone know script to move debuffs on enemy nameplate closer to their names ?
You’d need a proper addon not a short script to do this. You’d need to watch for NAME_PLATE_UNIT_ADDED and re-anchor the buff frame (frame.BuffFrame:SetPoint(blah)) for every nameplate. This might do the trick.
local f = CreateFrame('Frame')
local events = {}
local GetNamePlateForUnit = _G.C_NamePlate.GetNamePlateForUnit
function events:NAME_PLATE_UNIT_ADDED(_unitID)
local namePlate = GetNamePlateForUnit(_unitID)
if namePlate == nil or namePlate:IsForbidden() then
return
else
local frame = namePlate.UnitFrame
frame.BuffFrame:ClearAllPoints()
frame.BuffFrame:SetPoint("BOTTOMLEFT", frame, "LEFT", 20, 20) -- change these numbers to move the buffs around
end
end
for e, _ in pairs(events) do
f:RegisterEvent(e)
end
f:SetScript("OnEvent", function(self, event, ...) events[event](self, ...) end)
Make into addon at https://addon.bool.no
thank you very very very much <3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.