WoW:API TargetByName: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Remove singatures made using ~ in main namespace)
Line 25: Line 25:
: If '''exactMatch''' is set, TargetByName can also target party members even if they are out of visible range.
: 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. -- [[User:Flickering|Flickering]] 20:37, 7 Jan 2005 (EST)
: 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.

Revision as of 06:21, 10 February 2007

WoW API < TargetByName

Target a player by their name.

TargetByName("name", exactMatch);


Parameters

Arguments

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

Example

TargetByName("Norrin", true);

Details

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.