I'm trying to get party targets to spawn and it's really driving me crazy, I can't find out what's wrong.
I already have party pets working fine like that:
Code:
if(unit and unit:find('partypet%d')) then
...
blah
...
end
and to spawn them:
Code:
local partypet = {}
partypet[1] = oUF:Spawn('partypet1', 'oUF_PartyPet1')
partypet[1]:SetPoint('TOPRIGHT', party, 'TOPRIGHT', 160, -45)
partypet[1]:SetScale(0.8)
for i =2, 4 do
partypet[i] = oUF:Spawn('partypet'..i, 'oUF_PartyPet'..i)
partypet[i]:SetPoint('TOP', partypet[i-1], 'BOTTOM', 0, 125)
partypet[i]:SetScale(0.8)
end
I'm trying it the same way for party targets:
Code:
if(unit and unit:find('partytarget%d')) then
...
blah
...
end
and to spawn them:
Code:
local partytarget = {}
partytarget[1] = oUF:Spawn('partytarget1', 'oUF_PartyTarget1')
partytarget[1]:SetPoint('TOPRIGHT', party, 'TOPRIGHT', 180, 30)
--partytarget[1]:SetScale(0.8)
for i =2, 4 do
partytarget[i] = oUF:Spawn('partytarget'..i, 'oUF_PartyTarget'..i)
partytarget[i]:SetPoint('TOP', partytarget[i-1], 'BOTTOM', 0, 125)
partytarget[i]:SetScale(0.8)
end
I still don't see party targets in game, but only party pets? What am I doing wrong? There is NO lua error, it's just not working. Help!
PS: I also use this in my layout which might be an issue?
Code:
if(self:GetParent():GetName():match"oUF_Party") then
self:SetAttribute('initial-height', 18)
self:SetAttribute('initial-width', 200)
else
self:SetAttribute('initial-height', height)
self:SetAttribute('initial-width', width)
end