Thread Tools Display Modes
01-25-10, 05:52 PM   #1
[email protected]
A Kobold Labourer
Join Date: Aug 2009
Posts: 1
It sounds easy but...

Hi

My concerns is by showing an UnitFrame when a certain amount of HP (Power) has reached. I tried some Variables (fh or ismax) but none has run as I like. It is possible to hide/show when HP = 0 or max but not by defining a specific amount of HP.
I know its sounds stupid and the solution is maybe easy but I haven't funded yet. So is it possible to do such thing and the most important how?

Thanks a lot for your help.
  Reply With Quote
01-26-10, 04:04 AM   #2
Narinka
A Chromatic Dragonspawn
Join Date: Oct 2008
Posts: 165
Through scripts and scripted var maybe. Depending on this var you show hide your frame. As I understand you should use periodic repaint to run your script for this frame all the time. Just an idea
  Reply With Quote
01-26-10, 09:09 AM   #3
jfn302
An Aku'mai Servant
Join Date: Oct 2007
Posts: 36
I'm not sure if I completely understand what you are trying to accomplish. But, I think what you are trying to accomplish is a unit frame that is visible only when the target is at full health and when the target has 0 health (dead).

If this is correct, you can set the alpha of the frame to 0 except when the player is dead (there is a status variable for it.) or when the player is at max health (which I believe there is a variable for maxhp as well). When either of those two cases are true, set the alpha to 1.
  Reply With Quote
01-26-10, 09:29 AM   #4
Brainn
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 263
i cant check currently, but i think the variables for 0hp = dead and maxhp are available, but i think you would encounter some problems if you are trying to show/hide if one of those two variables is true, since the other would allways be false. something like this: "unithp = 0, i have to hide the frame, unithp not max, i have to show the frame". if this is what you are trying to do, you would need to do it with a scripted variable, but im not sure how exactly this would have to be set up.
  Reply With Quote
01-26-10, 10:46 AM   #5
LordEther
A Defias Bandit
Join Date: Jan 2010
Posts: 2
Sorry if i'm not very clear with my english :P.

My example, I want to show a unitframe when the target has under 2000 HP (or 20% of maxHP). If the target has more than 2000 HP (or 20% of maxHP) I want that the unit frame become invisible.
With dead or ismax, I founded how to deal with and it works perfectly. But for this specific example, I haven't succeed.

I will try with a scripted var...

Thanks a lot for your help.
  Reply With Quote
01-26-10, 12:37 PM   #6
Brainn
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 263
for your example it would be easy to do this with a filterset.
create a new filterset, in the editor add "HP..." from the Unit Status subsection. there you select current, then define the boundaries either numerical (lower 0, upper 2000) or by percentage (lower 0, upper 20). then add a "Unit in Set" variable to your unitframe, select the new set and use that variable for your show/hide shader.
  Reply With Quote
01-26-10, 04:22 PM   #7
LordEther
A Defias Bandit
Join Date: Jan 2010
Posts: 2
It works perfectly, thanks for your help
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » It sounds easy but...


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