Wikia

WoWWiki

Watchlist Recent changes

API TargetUnit

Main Menue



Selects the specified id as the current target.

TargetUnit("unit");

Parameters Edit

Arguments Edit

("unit")
unit 
String - The unitId to select as a target.

Returns Edit

nil

Example Edit

When the player changes his target there is a small delay before the global variable 'playertarget' is updated. This can be exploited and used for restoring your old target.
TargetUnit("unit")
CastSpell()
TargetUnit("playertarget")

Result Edit

This will restore your old target because of the delay. It will not clear your target if you didnt have one.

Details Edit

Selects the specified id as the current target. One can use any of the defined unitId values.

Pages on WoWWiki

94,193pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
55,622photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki