Thread Tools Display Modes
11-06-12, 06:28 PM   #1
Mouse987
A Defias Bandit
Join Date: Nov 2012
Posts: 3
Question Set Name Icons Without Nameplates

Hello I've coded a lot before but only just started looking into addons for WoW.

What I have managed to do so far is place a custom icon at the top of the target nameplate.

What I would like to know is if it is possible to place that icon even when nameplates are off.

If it is I would much appreciate a nudge in the right direction.

Thanks for any help.
  Reply With Quote
11-06-12, 08:08 PM   #2
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 837
what you wanna do will only work with nameplates turned on.
__________________
"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
  Reply With Quote
11-06-12, 08:47 PM   #3
Mouse987
A Defias Bandit
Join Date: Nov 2012
Posts: 3
Hm ok, thanks for the info.
  Reply With Quote
11-06-12, 09:19 PM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
You could just show the nameplates, use them as an anchor for your icon, and then just hide all of the visible elements.
  Reply With Quote
11-06-12, 11:51 PM   #5
Mouse987
A Defias Bandit
Join Date: Nov 2012
Posts: 3
Hey Semlar

That seems like my best option. I understand what you mean, I have downloaded some other nameplate addons to try and see how they reference the original nameplate but I'm having trouble.

Is there somewhere I can read about how to reference them?
  Reply With Quote
11-07-12, 03:01 AM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I'd suggest taking a look at a simple optionless addon like bNameplates or pNameplates, rather than some big complicated addon with options and modules like Aloft or TidyPlates. The parts you'll be most interested in are the GetChildren and GetRegions calls.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
11-07-12, 04:20 AM   #7
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Basically the addon periodically loops through children of WorldFrame and attempts to identify whether or not it's a nameplate, usually based on existence of a specific texture or attribute. Then it stores a reference to it in a table for later use.

There's very little information in the nameplate to help identify what unit it belongs to, so how complicated this needs to be depends on what you want to do with it.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Set Name Icons Without Nameplates

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