View Single Post
04-24-18, 07:26 AM   #1
GreyFox777
A Cliff Giant
Join Date: Jan 2017
Posts: 75
UnitThreat not working

can anyone tell, why does this code not working? Im trying to get the frame load if the party unit has threat >0

...
...
table.insert(self.__elements, function(self, _, unit, event, ...)
local status = UnitThreatSituation(unit)
if (unit == 'party1') or (unit == 'party2') or (unit == 'party3') or (unit == 'party4') then
if status and status >0 then
frame_3texture:SetTexture(m.textures.frame_3)

frame_3texture:Show()

else
frame_3texture:Hide()
end
end
end)
frame_3texture:SetPoint('CENTER', self, 'CENTER', 22, -2)
frame_3texture:SetSize(256,128)
frame_3texture:SetTexCoord(1, 0, 0, 1)
But It just does nothing
  Reply With Quote