Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API TargetByName

Last wiki revision 2020-01-08

Target a player by their name.

TargetByName("name", exactMatch);

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

TargetByName("Norrin", true);

  • 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.

Source

https://warcraft.wiki.gg/wiki/API_TargetByName · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.