WoW:API FollowByName: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Follow a player character with the specified name)
(→‎Details: Not possible to stop following. Point at FollowUnit.)
Line 1: Line 1:
{{API/Uncategorized}}
{{wowapi}} __NOTOC__
/script followbyname(%t)


This function allows you to follow a player with the name you specify instead of using a UnitID.  
Start following a player by their name.


Keep in mind that if the player with the name you specify is not close by, it may follow a different player with a similar name.
FollowByName("name", exactMatch);
 
 
== Parameters ==
===Arguments===
 
:("name", exactMatch)
 
:;name : String - The [[API TYPE PlayerName|name]] of the player to follow.
:;exactMatch : Boolean
 
== Example ==
 
FollowByName("Norrin", true);
 
== Details ==
 
* If the given player name isn't nearby or doesn't exist, and '''exactMatch''' isn't set, FollowByName picks the closest match from characters nearby.
 
* It is '''not possible''' to ''stop'' following someone from a script. The player needs to take action (move, jump, sit, whatever). See the [[Talk: API FollowUnit|{{discussiontab}} page]] for FollowUnit().
 
* See also [[API FollowUnit|FollowUnit]]()

Revision as of 16:20, 8 August 2006

WoW API < FollowByName

Start following a player by their name.

FollowByName("name", exactMatch);


Parameters

Arguments

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

Example

FollowByName("Norrin", true);

Details

  • If the given player name isn't nearby or doesn't exist, and exactMatch isn't set, FollowByName picks the closest match from characters nearby.
  • It is not possible to stop following someone from a script. The player needs to take action (move, jump, sit, whatever). See the discussion page for FollowUnit().