View Single Post
10-31-06, 11:48 PM   #8
Global
A Flamescale Wyrmkin
 
Global's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2005
Posts: 95
Originally Posted by Slouken
You can use the UnitWatch.lua registration to have frames shown/hidden based on the existence of units.
I guess that's where my problem is. I've looked at the file and just can't decipher exactly how to interface with it more than I already am. If I do something like this:

Code:
function Perl_Target_Events:PLAYER_TARGET_CHANGED()
	if (UnitExists("target")) then
		RegisterUnitWatch(this, true);
		Perl_Target_Update_Once();		-- Set the unchanging info for the target
	else
		UnregisterUnitWatch(this);
	end
end
Doing it this way won't show or hide the frame once in combat. I hate to ask for it, but any chance of a basic code snippet for how a more "basic" unit frame would tackle this?

Edit: So while I was/am waiting for a reply to this, I went ahead and cleaned up all the ADDON_ACTION_BLOCKED errors for the mod in order to prevent any taint if that would be a possible issue for this. The above function i posted is probably wrong since it doesn't work even after fixing all the blocked code. Not to mention, it throws additional action_blocked events. So I guess I'm just asking for the correct syntax on how to make the frame show/hide using the RegisterUnitWatch function.

Last edited by Global : 11-01-06 at 04:47 PM.
  Reply With Quote