Fandom

WoWWiki

API TargetByName

104,633pages on
this wiki
Add New Page
Talk2 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

WoW API < TargetByName

Target a player by their name.

TargetByName("name", exactMatch);


Parameters Edit

ArgumentsEdit

("name", exactMatch)
name 
String - The name of the player to target.
exactMatch 
Boolean

Example Edit

TargetByName("Norrin", true);

Details Edit

If the user isn't nearby or doesn't exist, and exactMatch isn't set, TargetByName picks the closest match from characters nearby.
If exactMatch is set, TargetByName can also target party members even if they are out of visible range.
If there is no close match available then an error message is displayed (Error event?) and the target is left unchanged. There is no return value from this method so the only way to check for success is see what the target ended up as afterwards.

Also on Fandom

Random Wiki