Target Name help - WoWInterface
Thread Tools Display Modes
06-22-07, 12:58 PM   #1
A Cyclonian
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 43
Target Name help

Lets say I'm making an addon to alert my warrior when to OVERPOWER, triggered by the target dodging in the combat log.

when the dodge occurs, this is fired

DEFAULT_CHAT_FRAME:AddMessage("Target Dodged: OVERPOWER now!");

How do I turn the word "target" into the actual name of my target?

I want it to tell me...

"Arcatraz Sentinel Dodges: OVERPOWER Now!

I've tried some things but to no success...can someone lease help out here?
  Reply With Quote
06-23-07, 05:03 AM   #2
A Chromatic Dragonspawn
shouryuu's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 150
Try something like this:
DEFAULT_CHAT_FRAME:AddMessage(TargetUnit("target").. "Dodged: OVERPOWER

In order to stick several strings together you have to do the following:
string1.. ..string2.. ..string3.. ..string4 in other words
string1DOTDOT space DOTDOTstring2DOTDOT space DOTDOTstring3DOTDOT space DOTDOTstring4
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Target Name help

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