Thread Tools Display Modes
07-08-10, 10:20 PM   #1
mankeluvsit
An Onyxian Warder
 
mankeluvsit's Avatar
Join Date: Sep 2008
Posts: 354
combo points

i never had to deal with combo points untill i started playing on my cousins rogue, and i want to see my CP's and im not getting it correctly.
lua Code:
  1. if unit=="player" then
  2.  
  3. if(playerClass=="ROGUE") then
  4. local CPoints = {}
  5. for index = 1, MAX_COMBO_POINTS do
  6.    local CPoint = self.Health:CreateFontString(nil, "OVERLAY")
  7.    CPoint:SetSize(6, 6)
  8.    CPoint:SetPoint("TOPLEFT", self.Health, 0, 0)
  9.  
  10.    CPoints[index] = CPoint
  11. end
  12. self.CPoints = CPoints
  13. end
  14. end
  15.  
  16.  
  17.  
  18.  
  19. -- ---------------------------------------- or ---------------------------------------- --
  20.  
  21.  
  22.  
  23.  
  24. if (class == "ROGUE") then
  25. self.cpoints = self.Health:CreateTexture(nil, "OVERLAY")
  26. self.cpoints:SetHeight(8)
  27. self.cpoints:SetWidth(8)
  28. self.cpoints:SetPoint("TOPRIGHT", self, -0, -6)
  29. end
*just a snippet
anyone see anything wrong?

Last edited by mankeluvsit : 07-08-10 at 10:37 PM.
  Reply With Quote
07-08-10, 11:36 PM   #2
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
You're trying to add CP to your player frame and not to the target frame.
  Reply With Quote
07-09-10, 02:42 AM   #3
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
In oUF 1.4 there are 2 ways to display combo points:

1) Use the 'cpoints' tag to display a text representation of the current combo points

e.g.
Code:
		local cpoints = self:CreateFontString(nil, 'OVERLAY')
		cpoints:SetPoint('RIGHT', self, 'LEFT', -config.SPACING, 0)
		cpoints:SetFont(config.FONT, config.FONTSIZELARGE, config.FONTBORDER)
		cpoints:SetJustifyH('RIGHT')
		self:Tag(cpoints, '|cffffffff[cpoints]|r')


2) Use the combo points element to display a number of texture for the current combo points

e.g.
Code:
	local cpoints = {}
	for i = 1, MAX_COMBO_POINTS do
		cpoints[i] = self:CreateTexture(nil, 'ARTWORK')
		cpoints[i]:SetSize(8, 8)
		cpoints[i]:SetTexture(1, i == 5 and 0 or 1, i == 5 and 0 or 1, 1)
		cpoints[i]:SetPoint('RIGHT', i == 1 and self or cpoints[i - 1], 'LEFT', -config.SPACING, 0)
	end
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » combo points

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