Thread Tools Display Modes
06-10-09, 09:06 AM   #1
byteasc
A Cyclonian
Join Date: Dec 2006
Posts: 43
Set Focus broken?

I'm not sure if this is mentioned elsewhere, but I tried to SetFocus on somebody in our raid today and got an error about protected function or something
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_060909_233016.jpg
Views:	796
Size:	324.6 KB
ID:	2874  
 
06-10-09, 09:16 AM   #2
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Originally Posted by byteasc View Post
I'm not sure if this is mentioned elsewhere, but I tried to SetFocus on somebody in our raid today and got an error about protected function or something
This is a known bug in Blizzard's code which affects all addons that use custom unit frames.

There are three ways you can work around this bug...
  • Press escape to open the WoW system menu and select the "Key Bindings" option. Scroll down the list until you find the key binding option for setting a focus and bind a key to that function. From then on, you can just target the player you want to set as focus and press the key.
  • Target the player you want to set as your focus and type '/focus' and press enter. To remove the current focus, make sure no one is targeted and type '/focus' and press enter. Yo ucan also type '/focus {player name}' to set whichever player you specify as your focus.
  • Type '/macro' to open the macro editor and create a new macro whose command is simply '/focus' then save the macro and drag the macro button onto your action bar. You can then just click the button to set the current target to your focus or remove your focus if you don't have a target.
I did go ahead and create a FAQ for this, as well, since this comes up fairly frequently. For future reference, it's at http://www.wowinterface.com/forums/s...ad.php?t=24655
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
06-10-09, 09:17 AM   #3
Vis
A Pyroguard Emberseer
 
Vis's Avatar
Join Date: Mar 2009
Posts: 1,827
If it's still the same issue that's been there for awhile in Blizz's UI then:

If you attempted to set the focus by Right Clicking and choosing the option from there, that would throw the error. You have to manually (or through a macro) set a target as your focus.

My recommendation is to create 2 macro's. One to make your current target your Focus, and another macro to Clear your Focus. I can't remember how to put a modifier in a macro right this moment, but these work.

The commands for the macro's or the chat box, minus the quotes of course

To set a Focus "/focus"

To clear a Focus "/clearfocus"

That's all there is too it.
 
06-10-09, 09:32 AM   #4
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Taking a wild stab at it -- I could be wrong, but I *think* it goes like this...

/cast [target=focus, exists] clearfocus; focus
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
06-10-09, 10:02 AM   #5
Vis
A Pyroguard Emberseer
 
Vis's Avatar
Join Date: Mar 2009
Posts: 1,827
Originally Posted by spiel2001 View Post
Taking a wild stab at it -- I could be wrong, but I *think* it goes like this...

/cast [target=focus, exists] clearfocus; focus
I gave it a shot, unfortunately it did did not seem to work Found a macro for polymorph and modified it for Focus though, lol.

Press nothing but the initial key, where ever you bind it to and you set a focus. Hold Alt and press that same key, clears focus

/focus [nomodifier]
/clearfocus [modifier:alt, target=focus]
 
06-10-09, 10:24 AM   #6
MidgetMage55
Grinch!
 
MidgetMage55's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,498
You can also make it conditional on the unit you want to focus or clear. this one designed for the mouse clicking types. Especially handy if you you rely on Clique for your casting.

This is taken from a macro i use for casting shackle on a focus (most of my macros are designed to different mouse clicks) and clearing it if the target is dead.

/focus [button:1,target=focus,noexists][button:1,target=harm]
/clearfocus [button:1,target=focus,dead]; [target=focus,help][modifier]

So what this will do is Focus my target if its hostile by clicking on it with mouse button 1, Clear it only if its dead (preventing you from accidentally focusing another target if your say sheeping one target but dpsing another) or if your focus is a friendly or if i need to change CC focus mid fight i can use a modifier key like alt or shift all just clicking with mouse button 1. There is more to the macro of course but its not really in the scope of the topic hehe.

EDIT: now that i look at it more closely. i might have to adjust the focus modifiers since it looks like itll set a new focus. Ill test it and adjust accordingly.

EDIT: 2 Ok its been fixed now. =)
__________________

I think Hong Kong Phooey was a ninja AND a pirate. That was just too much awesome. - Yhor

Last edited by MidgetMage55 : 06-10-09 at 10:49 AM. Reason: correctified
 
 

WoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Support » nUI: Bug Reports » Set Focus broken?

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