Thread Tools Display Modes
07-14-09, 03:07 AM   #1101
ninor
A Defias Bandit
Join Date: Apr 2008
Posts: 2
I'm trying to do some buff/debuff placement switching on whether or not my target is a player or an NPC. Since NPC's usually have a lot of debuffs and few buffs, and PC's usually have the opposite.

What I've tried so far:

Code:
if unit == "target" then
     if (UnitIsPlayer("target")) then
              self.Buff.blabla
              self.Debuff.blabla
     else
              self.Buff.etc
              self.Debuff.etc
     end
end
But it's not working. Do I need to specify a "nil" response instead of just "else"? Have I misunderstood UnitIsPlayer?
 
07-14-09, 06:17 AM   #1102
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Originally Posted by ninor View Post
I'm trying to do some buff/debuff placement switching on whether or not my target is a player or an NPC. Since NPC's usually have a lot of debuffs and few buffs, and PC's usually have the opposite.

What I've tried so far:

Code:
if unit == "target" then
     if (UnitIsPlayer("target")) then
              self.Buff.blabla
              self.Debuff.blabla
     else
              self.Buff.etc
              self.Debuff.etc
     end
end
But it's not working. Do I need to specify a "nil" response instead of just "else"? Have I misunderstood UnitIsPlayer?
Nope, UnitIsPlayer just returns true if it's a player character and nil if it's not.

First: I'm assuming this is just an example, but if it's not, the oUF aura elements are plural. Buffs and Debuffs.

Second: Are you doing that in your layout function? If you are, it won't work. The layout function is only called once to create the frame, it's not called when you change targets etc. You should use a PLAYER_TARGET_CHANGED event.
 
07-14-09, 12:03 PM   #1103
ninor
A Defias Bandit
Join Date: Apr 2008
Posts: 2
Originally Posted by Waverian View Post
Second: Are you doing that in your layout function? If you are, it won't work. The layout function is only called once to create the frame, it's not called when you change targets etc. You should use a PLAYER_TARGET_CHANGED event.
This was it, thank you.
 
07-17-09, 08:43 PM   #1104
Leevis
A Kobold Labourer
Join Date: Jul 2009
Posts: 1
Hey..

I'm new to lua-programming, but not to programming at all, but I can't find what I'm looking for. I'm using oUF_Luna and I'm looking for the lines that makes the Mana- & HP-Look.

First I want "19.9k" instead of "19900". And then, because the only char I'm playing is a DK, I don't want the percentage of my mana.

Oh god, I hope you understand me. My Englisch isn't good at all and it's about 4 a.m. here now. *tired*

Thank you for the help.

Greetings
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_071809_043643.jpg
Views:	662
Size:	156.5 KB
ID:	3046  
 
07-18-09, 06:32 AM   #1105
Elariah
Premium Member
 
Elariah's Avatar
Premium Member
Join Date: Jan 2006
Posts: 18
Is it possible with oUF to show the raid tag icon thingy on a targets frame? Next to the name or something.

i.e. Skull/Cross/Box/Star
 
07-18-09, 07:21 AM   #1106
Creatan
A Murloc Raider
Join Date: May 2009
Posts: 5
Originally Posted by Elariah View Post
Is it possible with oUF to show the raid tag icon thingy on a targets frame? Next to the name or something.

i.e. Skull/Cross/Box/Star
Should be possible considering that there's ricons.lua, in the elements folder, that has something to do with raidicons.
 
07-18-09, 10:59 AM   #1107
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Originally Posted by Elariah View Post
Is it possible with oUF to show the raid tag icon thingy on a targets frame? Next to the name or something.

i.e. Skull/Cross/Box/Star
Create a texture/point/height/width for self.RaidIcon, oUF will take care of the rest.
 
07-18-09, 10:30 PM   #1108
Aerials
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 92
Combat Icon

Hi, I really don't know if this has come up before, this thread is honestly quite long now and i have read about 1/2 of it...

Does anyone know a way to enable combat icons for frames other than the player one? trying to just add it in resulted in an icon that's always turned on. so i tried adding a check but honestly i'm kinda a noob (that's why my layout is called oUF_Noob lol) and i don't know how to implement that properly. so then i tried looking at the lua files in elements, i believe status.lua was the one where i found reference to the combat icon, in which it only had a check for the player frame leading me to believe that it's only supported for player by ouf. then i figured just make a plugin, but that was a little overwhelming for me .

anyway, /stoprambling, anyone know where i can find information that would help?
 
07-19-09, 04:00 AM   #1109
Creatan
A Murloc Raider
Join Date: May 2009
Posts: 5
Hi,

if I'm using xml-template to spawn partyframes, how do I change the frame sizes? Do I need to somehow declare each elements size or can I specify width and height for the frame?
 
07-19-09, 09:27 AM   #1110
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
Originally Posted by Creatan View Post
Hi,

if I'm using xml-template to spawn partyframes, how do I change the frame sizes? Do I need to somehow declare each elements size or can I specify width and height for the frame?
Two ways, in the style func or in the spawn code

Code:
if (not unit) then
	self:SetAttribute("initial-height", height)
	self:SetAttribute("initial-width", width)
end


Code:
local party = oUF:Spawn("header", "Party")
party:SetPoint(unpack(oufbrun.Party))
party:SetManyAttributes(
	"initial-width", width,
	"initial-height", height,
	"showParty", true,
	"yOffset", -79,
	"xOffset", -40,
	"maxColumns", 2,
	"unitsPerColumn", 2,
	"columnAnchorPoint", "LEFT",
	"columnSpacing", 40,
	"template", "oUF_PartyTemplate"
)

Last edited by Bruners : 07-19-09 at 09:37 AM.
 
07-28-09, 02:31 AM   #1111
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I have a pretty special problem and I hope some of you guys can help me out. I did those ring layouts lately

http://www.wowinterface.com/download...RingThing.html
http://www.wowinterface.com/download...ingThing2.html

My problem is: I currently cannot do castbars with it because there is no PostUpdateCast functionality. There is one for Channeled spells I think.

The rings need to be calculated by a function, its not just a simple statusbar that could be set by min/max. My problem is: how can I hook the onUpdate castbar function?

Any ideas?

I am currently doing this for health and mana. I created some fake self.Health and self.Power elements to make the functions available. The I used PostUpdateHealth and PostUpdatePower to calculate the rings/circles.

Can I use "OnCastbarUpdate" for this?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 07-28-09 at 03:46 AM.
 
07-28-09, 09:54 AM   #1112
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by zork View Post
I have a pretty special problem and I hope some of you guys can help me out. I did those ring layouts lately

http://www.wowinterface.com/download...RingThing.html
http://www.wowinterface.com/download...ingThing2.html

My problem is: I currently cannot do castbars with it because there is no PostUpdateCast functionality. There is one for Channeled spells I think.

The rings need to be calculated by a function, its not just a simple statusbar that could be set by min/max. My problem is: how can I hook the onUpdate castbar function?

Any ideas?

I am currently doing this for health and mana. I created some fake self.Health and self.Power elements to make the functions available. The I used PostUpdateHealth and PostUpdatePower to calculate the rings/circles.

Can I use "OnCastbarUpdate" for this?

Register your own events instead.
 
08-02-09, 11:29 AM   #1113
nailertn
An Aku'mai Servant
Join Date: Oct 2008
Posts: 33
How do you guys avoid polling for target - as in playertarget - when you spawn party frames with targets and include player? Currently I use this but it feels rather hackish.

Code:
local player2 = oUF:Spawn("player", "oUF_Player2")
player2:SetPoint("left", 5, 0)
player2:Disable()

local target2 = oUF:Spawn("target", "oUF_Target2")
target2:SetPoint("left", player2, "right", 5, 0)
target2:Disable()

local group = oUF:Spawn("header", "oUF_Group")
group:SetPoint("top", player2, "bottom", 0, -5)
group:SetManyAttributes("template", "SomethingUnique", "showParty", true, "yOffset", -5)

local function OnGroupShowHide(object)
	if object:IsVisible() then
		player2:Enable()
		target2:Enable()
	else
		player2:Disable()
		target2:Disable()
	end
end

local o = group.initialConfigFunction
group.initialConfigFunction = function(object, ...)
	o(object, ...)
	object:HookScript("OnShow", OnGroupShowHide)
	object:SetScript("OnHide", OnGroupShowHide)
	group.initialConfigFunction = o
end

group:Show()
Playing with the OnUpdate handler of that one particular frame smells even more trouble, so I was wondering if anyone had a clean solution. Or is it not worth the trouble to begin with...

Another question: Is there a working oUF implementation of vehicle switching for raid frames? If I am not mistaken vehicle.lua handles player only and since I am as clueless as one can get when it comes to state drivers I was unable to copy neither Blizzard's nor Pitbull's.
 
08-02-09, 11:35 AM   #1114
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Consider the target polling a bug and post a bug report on it. That way it won't be forgotten at least.
 
08-04-09, 06:26 PM   #1115
duhwhat
A Wyrmkin Dreamwalker
Join Date: Aug 2008
Posts: 51
getting this error using ouf lyn:

Code:
[20:24:18] Interface\AddOns\oUF_Lyn\layout.lua:94: attempt to call global 'GetDifficultyColor' (a nil value)
(tail call): ?
[C]: in function `GetDifficultyColor'
Interface\AddOns\oUF_Lyn\layout.lua:94: in function <Interface\AddOns\oUF_Lyn\layout.lua:90>
Interface\AddOns\oUF_Lyn\layout.lua:147: in function `UNIT_NAME_UPDATE'
Interface\AddOns\oUF_Lyn\layout.lua:201: in function <Interface\AddOns\oUF_Lyn\layout.lua:154>
Interface\AddOns\oUF_Banzai\oUF_Banzai.lua:42: in function `PostUpdateHealth'
Interface\AddOns\oUF\elements\health.lua:98: in function `func'
Interface\AddOns\oUF\ouf.lua:484: in function <Interface\AddOns\oUF\ouf.lua:479>
[C]: in function `Show'
Interface\FrameXML\SecureStateDriver.lua:72: in function <Interface\FrameXML\SecureStateDriver.lua:62>
Interface\FrameXML\SecureStateDriver.lua:111: in function <Interface\FrameXML\SecureStateDriver.lua:81>
target uf is not class colored and raid icons don't appear to be working correctly
 
08-04-09, 07:35 PM   #1116
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
change "GetDifficultyColor" to "GetQuestDifficultyColor" in the layout
 
08-07-09, 05:09 PM   #1117
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
http://www.wegame.com/watch/Roth_UI_...axy_animation/

<3 oUF
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
08-07-09, 07:06 PM   #1118
leyrhao
A Defias Bandit
AddOn Compiler - Click to view compilations
Join Date: Apr 2009
Posts: 2
Hello

I'm trying to make the player frame's bars grow from Right to Left. I don't know much about LUA, I've just made a few little things, but I have no idea on how could I make this. Any help, please?

Thanks
 
08-10-09, 12:12 PM   #1119
Irgnoam
A Deviate Faerie Dragon
Join Date: May 2009
Posts: 10
Love it. Feel like writing a detailed guide somewhere for the lua nabs among us? (*cough* me *cough*) Checked out the one you linked somewhere, but that wasn't really... Detailed enough for me.

...Or are you more into keeping it as a "LOL NUB IT'S MINEEEEE! MY PWECIOUSSS"-thing?
 
08-12-09, 11:21 AM   #1120
sailen
A Kobold Labourer
 
sailen's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2009
Posts: 1
Exclamation

Originally Posted by nailertn View Post
Another question: Is there a working oUF implementation of vehicle switching for raid frames? If I am not mistaken vehicle.lua handles player only and since I am as clueless as one can get when it comes to state drivers I was unable to copy neither Blizzard's nor Pitbull's.
I'm also looking for Vehicle Swapping for the party and raid frames. Could you help us please?
 

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