View Single Post
04-25-19, 05:54 PM   #9
bender1453
A Fallenroot Satyr
Join Date: Mar 2019
Posts: 21
Actually I do have a working script but it's only for attackable PVP players. I'm thinking about adding an OnLoad script that checks player faction to show the mentioned texture. The only problem is it FFA players. So, if we can eliminate FFA from the conditions it looks like it could work.

if UnitExists("target") == nil then
self:Hide()
return
end
if (UnitIsEnemy("player","target") and UnitIsPlayer("target")) then
self:Show()
else
self:Hide()
end

I'm a super newbie when it comes to this work but I remember seeing "not" operator when there was a condition that needed to be removed.

So for example I was using a Death Knight only frame and it had this condition:

local _, class = UnitClass("player");
if class == "DEATHKNIGHT" then
self:Show()
else
self:Hide()
end

If I can change the values so that it can check for my faction instead of my class, everything should work. Am I wrong here? Am I making any mistakes? Hope I'm not.

Last edited by bender1453 : 04-25-19 at 06:01 PM.
  Reply With Quote