WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Target Name help (https://www.wowinterface.com/forums/showthread.php?t=10709)

Tatheltek 06-22-07 12:58 PM

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?

shouryuu 06-23-07 05:03 AM

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


All times are GMT -6. The time now is 08:32 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI