WoW API: TargetNearestEnemy

From AddOn Studio
Revision as of 10:37, 24 September 2006 by WoWWiki>Gohbaani (Grammar fix)
Jump to navigation Jump to search

WoW API < TargetNearestEnemy

Selects the nearest enemy as the current target.

TargetNearestEnemy([reverse]);

Arguments
([reverse])
reverse
Boolean - Set to 1 or true to cycle backwards (optional).

Returns
nil

Example
TargetNearestEnemy();
Result

Description
Selects the nearest enemy as the current target.
This appears to be equivalent to pressing TAB, as it only cycles through enemies that you are facing, even if there are enemies behind you that are closer.
This function only works if initiated by a hardware event.