PDA

View Full Version : Retrieving name of selected target


Jerek
03-24-2005, 02:43 AM
Surely there must be a function to get the selected target name, but I can't find one. Anyone know it? I'm just about finished with a nifty little mod where you have to set a player name, but I want to be able to set them by just selecting them and typing the command, without needing to type the full name.

I'd also like to add the command to the menu that drops down when you right-click their portrait, but don't know where I'd start to do that. Anyone happen to know where I'd go to accomplish that as well?

Jerek
03-25-2005, 05:05 PM
Well, no one replied but I found out anyway. So for the benefit of anyone else wondering this:

local name = UnitName("target")
the UnitName("target") part has to be totally unchanged from how it is here.