Thread Tools Display Modes
06-25-09, 11:46 PM   #1081
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
You most likely haven't parented the frame correctly.
 
07-03-09, 10:16 AM   #1082
Redeemer32
A Defias Bandit
Join Date: Apr 2009
Posts: 2
No lua experience.

I would like to know how to enable pvp flag in ouf_d3orbs. If any1 is able to tell me where and how to code this into it i'd really appreciate it.
 
07-03-09, 10:37 AM   #1083
Starsunder
A Defias Bandit
Join Date: Jan 2007
Posts: 2
Hey I'm having a little trouble with my layout. I'm using a modified version of OUF Faith, and I can't seem to get this error to go away. I'm a bit of a noob when it comes to LUA but I can fake it lol.

When I target a mob with out mana, or rage I get this

Interface\addons\oUF_Faith\oUF_faith.lua.244: Attempt to call global "truncate" (a nil value)

Think it has to do with this line of code but I dont know how to fix it heh.

Code:
local function PostUpdateHealth(self, event, unit, bar, min, max)
	-- bar:SetStatusBarColor(0.329411764705882, 0.3254901960784314, 0.3333333333333333) 
	if(not UnitIsConnected(unit)) then
		bar.Text:SetText('D/C')
	elseif(UnitIsDead(unit)) then
		bar.Text:SetText('Dead')
	elseif(UnitIsGhost(unit)) then
		bar.Text:SetText('Ghost')
	else
		if(unit == 'target' and UnitCanAttack('player', 'target')) then
			bar.Text:SetFormattedText('%s (%d|cff0090ff%%|r)', truncate(min),
 
07-05-09, 10:11 PM   #1084
Aesyl
A Murloc Raider
Join Date: Feb 2008
Posts: 4
Portraits in 3.2

In the 3.2 PTR client, generating a Model frame of a boss level target dummy (and possibly other units, those are the only ones I've seen it happen with) causes the client to crash. I've submitted a bug report to Blizzard, but layout authors should be aware of it if it's not fixed by the time 3.2 goes live.

For the time being, I've altered my layout not to use portraits for NPCs.
 
07-06-09, 01:56 AM   #1085
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Bad news :/
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
07-06-09, 05:00 PM   #1086
fnacke
A Deviate Faerie Dragon
Join Date: Jun 2009
Posts: 13
Hey im i greater need of some help with this addon.
Im using oUF_Caellian and i would like to get the debuffs showing on targets target.
For example if im targeting a rogue and hes targeting me i can see my own debuffs, i think you understand

To make is simple for you guys i got a picture of how i want it to look:


This is how it looks now:


Would be EPIC with some help with this, any way i could change some text in the oUF_cMain and get what i want?

thanks<3

Last edited by fnacke : 07-06-09 at 05:03 PM.
 
07-07-09, 03:45 AM   #1087
Elariah
Premium Member
 
Elariah's Avatar
Premium Member
Join Date: Jan 2006
Posts: 18
I've seen the tagging stuff, self:Tag(info, '[customname]') and this sets an objects text string to the tag it seems. But I'm just wondering if there is a way to check the values of the tag before doing this?

I have one called [hot] and this contains a count of all hots on the target, however I want to use this to check if thid tag is greater than 0 before displaying another icon. So something like unit[hot] to check the value? But this doesn't work as I don't fully understand how the tags are attached to the unit object to get at them. Any idea's please?


@fnacke
Search for
Code:
if unit == "player" or unit == "target" then
around line 733.

You'll probably need to add something along the lines of
Code:
	if unit == "targettarget" then
		self.Debuffs = CreateFrame("Frame", nil, self)
		self.Debuffs:SetHeight(23 * 0.97)
		self.Debuffs:SetWidth(230)
		self.Debuffs.size = 23 * 0.97
		self.Debuffs.spacing = 1
		self.Debuffs:SetPoint("TOPLEFT", self, "BOTTOMLEFT", -1, -8)
		self.Debuffs.initialAnchor = "TOPLEFT"
		self.Debuffs["growth-y"] = "DOWN"
		self.Debuffs.onlyShowPlayer = false
	end
Just above this. I can't try this, and you'll need to play with the SetPoint,anchor and growth parts to display where you want it. But that'd show the debuffs anyway.

Last edited by Elariah : 07-07-09 at 03:51 AM.
 
07-07-09, 04:06 AM   #1088
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Originally Posted by NarusegawaNaru View Post
I've seen the tagging stuff, self:Tag(info, '[customname]') and this sets an objects text string to the tag it seems. But I'm just wondering if there is a way to check the values of the tag before doing this?

I have one called [hot] and this contains a count of all hots on the target, however I want to use this to check if thid tag is greater than 0 before displaying another icon. So something like unit[hot] to check the value? But this doesn't work as I don't fully understand how the tags are attached to the unit object to get at them. Any idea's please?
Tags are just a table with a string index ("[tagname]") and a function value. If you want to check the value of a tag outside of the tag itself you can just call its function:

Code:
local myTagValue = oUF.Tags["[hot]"](unit)
if myTagValue ... then
    ...
end
 
07-07-09, 05:13 AM   #1089
Elariah
Premium Member
 
Elariah's Avatar
Premium Member
Join Date: Jan 2006
Posts: 18
Cool thanks, I'll give that a bash later in some print statements
 
07-07-09, 06:43 AM   #1090
fnacke
A Deviate Faerie Dragon
Join Date: Jun 2009
Posts: 13
sorry, i've been trying to fix this target of target now for an hour without sucess, any more ideas / codes?
ty
 
07-07-09, 04:51 PM   #1091
Qupe
A Warpwood Thunder Caller
 
Qupe's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 92
Any ideas as to what needs to be fixed in layouts (etc..) in regards to the upcoming 3.2 patch? I've loaded my UI up on ptr to see whats been completely destroyed and everything seems to be working properly except for ouf... and again, most likely just the layout.

Also, was wondering what I would need to change to have my raid frames (to an extent party frames as well) switch properly when people enter vehicles. Right now my player frame switches properly but my whole raid still displays the character and not the character in their vehicle (vehicle hp, steam pressure, demolisher pyrite capacity, etc...).
 
07-07-09, 04:54 PM   #1092
Qupe
A Warpwood Thunder Caller
 
Qupe's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 92
Originally Posted by fnacke View Post
sorry, i've been trying to fix this target of target now for an hour without sucess, any more ideas / codes?
ty
Have you tried a line like this:
Code:
self.Debuffs.filter = "HARMFUL|PLAYER"
 
07-11-09, 04:06 AM   #1093
nailertn
An Aku'mai Servant
Join Date: Oct 2008
Posts: 33
What would be the proper way to get oUF to run myfunc each time a unit of an object changes? For example on target and TOT frames I would like to hide the power bar for non-mana user NPCs, show and set appropriate color otherwise, and doing this on every UNIT_MANA event is something I would rather avoid. I tried and failed for some reason with the following:

Code:
oUF.PLAYER_ENTERING_WORLD = function(self, event)
	local unit = self.unit
	if(not UnitExists(unit)) then return end

	for _, func in next, self.__elements do
		func(self, event, unit)
	end

	myfunc(self)
end
Simply putting myfunc into the relevant frames' __elements table seems to do the trick, however I wonder if this is the right way or should I just register self for a bunch of events that may signal a new unit and let myfunc handle those?
 
07-11-09, 10:51 AM   #1094
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Originally Posted by nailertn View Post
What would be the proper way to get oUF to run myfunc each time a unit of an object changes? For example on target and TOT frames I would like to hide the power bar for non-mana user NPCs, show and set appropriate color otherwise, and doing this on every UNIT_MANA event is something I would rather avoid. I tried and failed for some reason with the following:

Code:
oUF.PLAYER_ENTERING_WORLD = function(self, event)
	local unit = self.unit
	if(not UnitExists(unit)) then return end

	for _, func in next, self.__elements do
		func(self, event, unit)
	end

	myfunc(self)
end
Simply putting myfunc into the relevant frames' __elements table seems to do the trick, however I wonder if this is the right way or should I just register self for a bunch of events that may signal a new unit and let myfunc handle those?
Use PostUpdatePower. In your function you can do

Code:
     if somearbitrarycriteria then
          self.Power:Hide()
     end
 
07-12-09, 12:07 PM   #1095
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by nailertn View Post
What would be the proper way to get oUF to run myfunc each time a unit of an object changes? For example on target and TOT frames I would like to hide the power bar for non-mana user NPCs, show and set appropriate color otherwise, and doing this on every UNIT_MANA event is something I would rather avoid. I tried and failed for some reason with the following:

Code:
oUF.PLAYER_ENTERING_WORLD = function(self, event)
	local unit = self.unit
	if(not UnitExists(unit)) then return end

	for _, func in next, self.__elements do
		func(self, event, unit)
	end

	myfunc(self)
end
Simply putting myfunc into the relevant frames' __elements table seems to do the trick, however I wonder if this is the right way or should I just register self for a bunch of events that may signal a new unit and let myfunc handle those?
Take a look at how oUF_Lily does it.
 
07-13-09, 05:16 AM   #1096
nailertn
An Aku'mai Servant
Join Date: Oct 2008
Posts: 33
After posting I realized UNIT_MANA was a dumb example, just needed a generic update function. So it is __elements indeed, thanks!
 
07-13-09, 02:03 PM   #1097
Elariah
Premium Member
 
Elariah's Avatar
Premium Member
Join Date: Jan 2006
Posts: 18
Hi,

I'm trying to add a bar to my UI to track my honor points, it works mostly but I'm confused with the color gradient stuff.

I've hardcoded it below, as if I use the hr,hg,hb values it looks just... grey all the time.

Code:
	local value, max = GetHonorCurrency()
	max = 75000
	bar:SetMinMaxValues(0, max)
	bar:SetValue(value)
	local hr,hg,hb = oUF.ColorGradient(value/max, 181, 79, 79, 181, 110, 68, 90, 208, 243)
	bar:SetStatusBarColor(0.75,0.75,0.2,0.75)
	bar:Show()
I'm trying to get this to go from dark green (0%) to dark yellow to dark red (100%)

Any clues on what I need to be setting in my ColorGradient line?

Thanks
 
07-13-09, 02:07 PM   #1098
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Code:
oUF.ColorGradient(value/max, 181/255, 79/255, 79/255, 181/255, 110/255, 68/255, 90/255, 208/255, 243/255)
:SetStatusBarColor(), uses rgb values from 0-1, not 0-255.
 
07-13-09, 02:17 PM   #1099
Elariah
Premium Member
 
Elariah's Avatar
Premium Member
Join Date: Jan 2006
Posts: 18
Okay, but which way do I do it?

How many numbers can I have in the list?

Is it rgb rgb rgb or can I have as many iterations as I wanted?
 
07-13-09, 03:44 PM   #1100
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Elariah View Post
Okay, but which way do I do it?

How many numbers can I have in the list?

Is it rgb rgb rgb or can I have as many iterations as I wanted?
oUF.ColorGradient(perc, r1, g1, b1, r2, g2, b2 [rN, gN, bN]*)

The limit is pretty much endless.
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - Layout discussion

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