Thread Tools Display Modes
02-01-19, 02:56 AM   #1
GreyFox777
A Cliff Giant
Join Date: Jan 2017
Posts: 75
Hide frames in Raid

Can someone tell how to prevent spawner from load if player are in raid?

have this block of code at the end of my lua file

Code:
oUF:RegisterStyle("Party 1 Frame", create)
oUF:SetActiveStyle("Party 1 Frame")
oUF:Spawn("party1", "MyFrames_Party1Frame")
  Reply With Quote
02-07-19, 07:56 AM   #2
Lolzen
An Aku'mai Servant
 
Lolzen's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 36
You could use UnitInRaid, however oUF can handle this for you.

here's an example of party
Lua Code:
  1. local party = self:SpawnHeader(
  2.     nil, nil, 'party,solo',
  3.     'showParty', true,
  4.     'showPlayer', true,
  5.     'showSolo', false,
  6.     'xOffset', 0,
  7.     'yoffset', 0,
  8.     'oUF-initialConfigFunction', [[
  9.         self:SetHeight(19)
  10.         self:SetWidth(70)
  11.     ]],
  12.     'maxColumns', 5,
  13.     'unitsperColumn', 1,
  14.     'columnSpacing', 5,
  15.     'columnAnchorPoint', "TOP"
  16. )
  17. party:SetPoint("BOTTOM", UIParent, 0, 140)

where this is an example for a raidgroup
Lua Code:
  1. local raid = self:SpawnHeader(
  2.     nil, nil, 'raid,party,solo',
  3.     'showPlayer', true,
  4.     'showSolo', false,
  5.     'showParty', false,
  6.     'showRaid', true,
  7.     'xoffset', 7,
  8.     'yOffset', -5,
  9.     'oUF-initialConfigFunction', [[
  10.         self:SetHeight(19)
  11.         self:SetWidth(50)
  12.     ]],
  13.     'groupFilter', '1,2,3,4,5,6,7,8',
  14.     'groupingOrder', '8,7,6,5,4,3,2,1',
  15.     'sortMethod', 'NAME',
  16.     'groupBy', 'GROUP',
  17.     'maxColumns', 8,
  18.     'unitsPerColumn', 5,
  19.     'columnSpacing', 7,
  20.     'columnAnchorPoint', "RIGHT"
  21. )
  22. raid:SetPoint("LEFT", UIParent, 20, 0)

notice 'showRaid' in particular.
I'd suggest to look into other people's layouts to see how they handle party/raid. oUF is VERY flexible.
  Reply With Quote
02-07-19, 12:29 PM   #3
GreyFox777
A Cliff Giant
Join Date: Jan 2017
Posts: 75
so i did it like so but it just doesen't spawn...

Lua Code:
  1. local create = function(self)
  2.     self.unitType = "party"
  3.     self:SetSize(300, 81)
  4.     self:SetPoint("RIGHT", 0, 0)
  5.     self.colors = ns.colors
  6.     self:RegisterForClicks('AnyUp')
  7.  
  8.  
  9.  
  10. -- -----------------------------------
  11. -- > SPAWN UNIT
  12. -- -----------------------------------
  13. oUF:RegisterStyle("Party Frame", create)
  14. oUF:SetActiveStyle("Party Frame")
  15. local party = self:SpawnHeader(
  16.     nil, nil, 'party,solo',
  17.     'showParty', true,
  18.     'showPlayer', true,
  19.     'showSolo', false,
  20.     'xOffset', 0,
  21.     'yoffset', 0,
  22.     'oUF-initialConfigFunction', [[
  23.         self:SetHeight(19)
  24.         self:SetWidth(70)
  25.     ]],
  26.     'maxColumns', 5,
  27.     'unitsperColumn', 1,
  28.     'columnSpacing', 5,
  29.     'columnAnchorPoint', "TOP"
  30. )
  31. party:SetPoint("BOTTOM", UIParent, 0, 140)
  32.  
  33. end

what im douing wrong?

And is there a way to make it just for party1, party2 etc?
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Hide frames in Raid

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off