Hello All!
Was wondering if anybody could help with a bit of Lua code that can
Increase the Alpha / Fade Transparency of the Blizzard Raid Frames, for raid members that are out of the 40yd Spell Range? Found a number of addons out there that can achieve this, but am trying to avoid DL'ing addons as much as possible.
I found this bit of Lua which does work, but it keeps throwing errors for some reason?
Lua Code:
--[Change Raid Frame OOR Fade/Alpha Transparency]
hooksecurefunc("CompactUnitFrame_UpdateInRange",function(frame)
local inRange,checkedRange = UnitInRange(frame.displayedUnit)
if checkedRange and not inRange then
frame.background:SetAlpha(0.3)
frame:SetAlpha(0.3)
else
frame.background:SetAlpha(1)
frame:SetAlpha(1)
end
end)
And here is the error that Bug Sack is logging:
802x Custom Settings\Custom Settings.lua:602: attempt to index field 'background' (a nil value)
Custom Settings\Custom Settings.lua:602: in function <Custom Settings\Custom Settings.lua:596>
Any help is appreciated, thank you in advance!