Thread Tools Display Modes
10-30-07, 02:13 PM   #1
fadedroses
A Deviate Faerie Dragon
 
fadedroses's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 10
Simple - How to identify the target??

Hi, I've searched the wowwiki and even screwed around but I can't seem to find the right variable. Here is some example code of what I'm trying to do:

Code:
if ("target" ==nil) then
   WhatsTargetted = "Nothing";    
elseif ("target" ~=nil) then
   WhatsTargetted = "target";    -- This is what is always run, obviously
end;

if (WhatsTargetted ~="Nothing") then
   SendChatMessage("I have you targetted", "WHISPER", this.language, WhatsTargetted);
else
   DEFAULT_CHAT_FRAME:AddMessage("Nothing is targetted");   
end;
I'm having trouble finding the variable that stores what the player is currently targetting. That same variable should be nil or "" if there is nothing targetted, right?

"target" obviously doesn't seem to be it..

Thanks so much in advance!

Last edited by fadedroses : 10-30-07 at 03:41 PM. Reason: Grammar
  Reply With Quote
10-30-07, 06:28 PM   #2
fadedroses
A Deviate Faerie Dragon
 
fadedroses's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 10
nm, the answer was UnitName("target")

=)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Target help


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