View Single Post
01-07-19, 03:08 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
Toggling the show state of secure frames like unit frames and action bars can be problematic because if you do it in combat you will get errors.

Normally you would register the condition(s) you want them shown/hidden using RegisterStateDriver() and let the game look after them, like:

Code:
RegisterStateDriver(PlayerFrame, "visibility", "[petbattle] hide; default")
To hide when entering a pet battle and show again when leaving.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote