Well, it was there, I figured I'd try it. See how it works out. Though I have to admit, because of coloring options etc, I'd end up with long chains of if-statements, it may not be an inch "shorter" than just coding it myself like in my other layouts. Now, [Name] is handy, but the hp/mp options, I'll hold myself :)
ps. Phanx, try to say "seal cub clubbing club" ten times really fast LOL
self.Name:SetText(unit == 'target' and '[name] |cff0090ff[smartlevel][rare]|r' or '[name]')
Now do the same with a 'if' statement mess? I prefer tags :)
I said Name was handy :P The more "static" labels are awesome. But Health/MP can have - depending on personal flavour, and mine's rather exotic - it so complex, based on unit/amount of defecit.
I said Name was handy :P The more "static" labels are awesome. But Health/MP can have - depending on personal flavour, and mine's rather exotic - it so complex, based on unit/amount of defecit.
Quoted the wrong person lol :p
And yeah, I still keep hp/mp values set the old way aswell.
oUF:SetActiveStyle('AI_Raid')
local raid = {}
for i = 1, 8 do
local raidgroup = oUF:Spawn('header', 'oUF_Raid'..i)
raidgroup:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'yOffSet', -8)
table.insert(raid, raidgroup)
if(i==1) then
raidgroup:SetPoint('LEFT', UIParent, 'LEFT', 10, -300)
else
raidgroup:SetPoint('TOPLEFT', raid[i-1], 'TOPRIGHT', 8, 0)
end
raidgroup:Show()
end
still no luck with
if(InCombatLockdown()) then
self:RegisterEvent('PLAYER_REGEN_ENABLED')
else
self:UnregisterEvent('PLAYER_REGEN_ENABLED')
if(GetNumPartyMembers() > 1 and GetNumPartyMembers() <= 5) then
party:Show()
for key, object in ipairs(pets) do
RegisterUnitWatch(object)
end
for _,i in ipairs(Raid) do
i:Hide()
end
elseif(GetNumRaidMembers() > 5) then
party:Hide()
for key, object in ipairs(pets) do
UnregisterUnitWatch(object)
object:Hide()
end
for _,i in ipairs(Raid) do
i:Show()
end
else
party:Show()
for key, object in ipairs(pets) do
RegisterUnitWatch(object)
end
end
end
- Fix so tags works with any units (especially targettarget)
- Add a fallback texture and coords to self.Threat if its a texture (Interface\Minimap\ObjectIcons and '6/8, 7/8, 1/2, 1' (coords))
if(GetNumRaidMembers > 5) then
party:Hide()
for _,i in ipairs(raid) do i:Show() end
for _,i in ipairs(pets) do i:Hide() end
else
party:Show()
for _,i in ipairs(raid) do i:Hide() end
for _,i in ipairs(pets) do i:Show() end
end
Interface\AddOns\oUF_AI\oUF_AI.lua:645: bad argument #1 to 'ipairs' (table expected, got nil)
[C]: ?
[C]: in function `ipairs'
Interface\AddOns\oUF_AI\oUF_AI.lua:645: in function <Interface\AddOns\oUF_AI\oUF_AI.lua:631>
local partyToggle = CreateFrame('Frame')
partyToggle:RegisterEvent('PLAYER_LOGIN')
partyToggle:RegisterEvent('RAID_ROSTER_UPDATE')
partyToggle:RegisterEvent('PARTY_LEADER_CHANGED')
partyToggle:RegisterEvent('PARTY_MEMBER_CHANGED')
partyToggle:SetScript('OnEvent', function(self)
if(InCombatLockdown()) then
self:RegisterEvent('PLAYER_REGEN_ENABLED')
else
self:UnregisterEvent('PLAYER_REGEN_ENABLED')
if(GetNumRaidMembers() > 5) then
party:Hide()
for _,i in ipairs(raid) do i:Show() end
for key, object in ipairs(pets) do
UnregisterUnitWatch(object)
object:Hide()
end
else
party:Show()
for _,i in ipairs(raid) do i:Hide() end -- LINE 645
for key, object in ipairs(pets) do
RegisterUnitWatch(object)
end
end
end
end)
p3lim the code for pets was not working. any other sugestions?
For showing raid is there anyway to only show raids if your NOT in a battleground? Just a though but I don't really need a raid frame when I'm in a BG so would be nice hide raid and party frames in such case.
Interface\AddOns\oUF_AI\oUF_AI.lua:645: bad argument #1 to 'ipairs' (table expected, got nil)
[C]: ?
[C]: in function `ipairs'
Interface\AddOns\oUF_AI\oUF_AI.lua:645: in function <Interface\AddOns\oUF_AI\oUF_AI.lua:631>
local partyToggle = CreateFrame('Frame')
partyToggle:RegisterEvent('PLAYER_LOGIN')
partyToggle:RegisterEvent('RAID_ROSTER_UPDATE')
partyToggle:RegisterEvent('PARTY_LEADER_CHANGED')
partyToggle:RegisterEvent('PARTY_MEMBER_CHANGED')
partyToggle:SetScript('OnEvent', function(self)
if(InCombatLockdown()) then
self:RegisterEvent('PLAYER_REGEN_ENABLED')
else
self:UnregisterEvent('PLAYER_REGEN_ENABLED')
if(GetNumRaidMembers() > 5) then
party:Hide()
for _,i in ipairs(raid) do i:Show() end
for key, object in ipairs(pets) do
UnregisterUnitWatch(object)
object:Hide()
end
else
party:Show()
for _,i in ipairs(raid) do i:Hide() end -- LINE 645
for key, object in ipairs(pets) do
RegisterUnitWatch(object)
end
end
end
end)
p3lim the code for pets was not working. any other sugestions?
local partyToggle = CreateFrame('Frame')
partyToggle:RegisterEvent('PLAYER_LOGIN')
partyToggle:RegisterEvent('RAID_ROSTER_UPDATE')
partyToggle:RegisterEvent('PARTY_LEADER_CHANGED')
partyToggle:RegisterEvent('PARTY_MEMBER_CHANGED')
partyToggle:SetScript('OnEvent', function(self)
if(InCombatLockdown()) then
self:RegisterEvent('PLAYER_REGEN_ENABLED')
else
self:UnregisterEvent('PLAYER_REGEN_ENABLED')
local zone = GetRealZoneText()
if(zone == 'Warsong Gulch' or zone == 'Arathi Basin' or zone == 'Alterac Valley' or zone == 'Eye of the Storm') then
party:Hide()
for i, v in ipairs(Raid) do v:Hide() end
for i, v in ipairs(pets) do
UnregisterUnitWatch(v)
v:Hide()
end
else
if(GetNumRaidMembers() > 0) then
party:Hide()
for _, v in ipairs(Raid) do v:Show() end
for i, v in ipairs(pets) do
UnregisterUnitWatch(v)
v:Hide()
end
else
party:Show()
for _, v in ipairs(Raid) do v:Hide() end
for i, v in ipairs(pets) do
RegisterUnitWatch(v)
v:Show()
end
end
end
end
end)
I didn't check to see if those are the exact zone names for the BGs, so if that doesn't work, you might want to check the names.
oUF:SetActiveStyle('AI_Raid')
local raid = {}
for i = 1, 8 do
local raidgroup = oUF:Spawn('header', 'oUF_Raid'..i)
raidgroup:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'yOffSet', -8)
table.insert(raid, raidgroup)
if(i==1) then
raidgroup:SetPoint('LEFT', UIParent, 'LEFT', 10, -300)
else
raidgroup:SetPoint('TOPLEFT', raid[i-1], 'TOPRIGHT', 8, 0)
end
raidgroup:Show()
end
I just don't get it, why does it still error. casesensitve is okay both are raid.
there is a table called raid
code at this time is
local partyToggle = CreateFrame('Frame')
partyToggle:RegisterEvent('PLAYER_LOGIN')
partyToggle:RegisterEvent('RAID_ROSTER_UPDATE')
partyToggle:RegisterEvent('PARTY_LEADER_CHANGED')
partyToggle:RegisterEvent('PARTY_MEMBER_CHANGED')
partyToggle:SetScript('OnEvent', function(self)
if(InCombatLockdown()) then
self:RegisterEvent('PLAYER_REGEN_ENABLED')
else
self:UnregisterEvent('PLAYER_REGEN_ENABLED')
if(GetNumRaidMembers() > 5) then
party:Hide()
-- for _,i in ipairs(raid) do i:Show() end
for key, object in ipairs(pets) do
UnregisterUnitWatch(object)
object:Hide()
end
else
party:Show()
-- for _,i in ipairs(raid) do i:Hide() end
for key, object in ipairs(pets) do
RegisterUnitWatch(object)
end
end
end
end)
aesyl if that part was for me. I just want to show 5man raid (arena / old instances) as a party
For some reason I thought you and the person asking about hiding raid frames in battlegrounds were the same person, so I used your function. Anyway, Will, I'd change that to..
local partyToggle = CreateFrame('Frame')
partyToggle:RegisterEvent('PLAYER_LOGIN')
partyToggle:RegisterEvent('RAID_ROSTER_UPDATE')
partyToggle:RegisterEvent('PARTY_LEADER_CHANGED')
partyToggle:RegisterEvent('PARTY_MEMBER_CHANGED')
partyToggle:SetScript('OnEvent', function(self)
if(InCombatLockdown()) then
self:RegisterEvent('PLAYER_REGEN_ENABLED')
else
self:UnregisterEvent('PLAYER_REGEN_ENABLED')
local _, zonetype = IsInInstance()
if(zonetype == 'pvp') then
party:Hide()
for _, v in ipairs(Raid) do v:Hide() end
else
if(GetNumRaidMembers() > 0) then
party:Hide()
for _, v in ipairs(Raid) do v:Show() end
else
party:Show()
for _, v in ipairs(Raid) do v:Hide() end
end
end
end
end)
Total new to oUF and have been messing around with oUF_Lyn-1.2 layout moving things about and getting a layout i like, love the design of the frames btw lyn :)
Being a total code noob could some one tell me if its possible to enter a command so that it will display my party frames and raid frames focus, etc etc with out the need for being in a raid or party.
I apologize in advance if I've missed it whilst looking through the thread.
So i'm trying to get my part frames to go horizontally, similarly to Coldfury's layout in oUF_Lighterfluid.
The code i've tried so far is Lighterfluids code(Produced an error) and this:
local party = oUF:Spawn("header", "oUF_Party")
party:SetManyAttributes("xOffset", 20, "point", "LEFT")
party:SetPoint("BOTTOM", 0, 300)
party:Show()
party:SetAttribute("showRaid", false)
Which doesn't produce an error but doesn't show anything.
Any help?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Now do the same with a 'if' statement mess? I prefer tags :)
Quoted the wrong person lol :p
And yeah, I still keep hp/mp values set the old way aswell.
still no luck with
But the both point to raid now if i'm correct
- Fix so tags works with any units (especially targettarget)
- Add a fallback texture and coords to self.Threat if its a texture (Interface\Minimap\ObjectIcons and '6/8, 7/8, 1/2, 1' (coords))
I think thats it :)
Lua is case-sensitive like most languages.
untested, but should work:
How to reproduce:
Untarget anything
Cast something (player)
Target self
The target castbar wont show (works with channeling spells though)
p3lim the code for pets was not working. any other sugestions?
Thanks
seems you have no table named 'raid'
I didn't check to see if those are the exact zone names for the BGs, so if that doesn't work, you might want to check the names.
Aswell, that right there is not localized.
edit: confirmed, GetNumRaidMembers() returns in battlegrounds too
spawning raid is done by
I just don't get it, why does it still error. casesensitve is okay both are raid.
there is a table called raid
code at this time is
aesyl if that part was for me. I just want to show 5man raid (arena / old instances) as a party
Being a total code noob could some one tell me if its possible to enter a command so that it will display my party frames and raid frames focus, etc etc with out the need for being in a raid or party.
I apologize in advance if I've missed it whilst looking through the thread.
Thanks
Mike
The code i've tried so far is Lighterfluids code(Produced an error) and this:
Which doesn't produce an error but doesn't show anything.
Any help?