Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-30-12, 02:11 PM   #1
SRCarebear
A Fallenroot Satyr
AddOn Compiler - Click to view compilations
Join Date: Mar 2009
Posts: 26
Making frame appear in combat. Hide out of combat.

I'm working on an edit of sFilter to track all general debuffs on the target. I renamed it to aFilter as I still use sFilter for personal buffs. I'm a little stuck though in trying to make the frame appear when I am only in combat.

Screenshots in combat:

http://i.imgur.com/LG565.jpg
http://i.imgur.com/Cljyl.jpg

Screenshot out of combat:

http://i.imgur.com/3UBP3.jpg

I have attempted to add some code to hide the frame out of combat and pop up for when I'm in combat but it only pops up for a second and then disappears again instantly.

I added
Code:
frame:RegisterEvent("PLAYER_REGEN_ENABLED")
frame:RegisterEvent("PLAYER_REGEN_DISABLED")
to the function, and also added

Code:
			
if event == "PLAYER_REGEN_DISABLED" then
self:Show()
else
self:Hide() 
end
end)
How do I make it appear for the whole duration of combat, and not just when I get into combat?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Making frame appear in combat. Hide out of combat.


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