WoW:API TargetUnit: Difference between revisions

m
Added other category.
No edit summary
m (Added other category.)
Line 3: Line 3:
Selects the specified id as the current target.  
Selects the specified id as the current target.  


  TargetUnit(id);
  TargetUnit("unit");


----
----
;''Arguments''
;''Arguments''


:(String id)
:("unit")


:;id : the identifier of the target to select
:;unit : String - The [[API TYPE UnitId|UnitId]] to select as a target.


----
----
Line 26: Line 26:
;''Description''
;''Description''


: Selects the specified id as the current target. The id can be any of <tt>"player"</tt>, <tt>"pet"</tt>, <tt>"party1"</tt>, <tt>"party2"</tt>, <tt>"party3"</tt> or <tt>"party4"</tt>.  
: Selects the specified id as the current target. One can use any of the defined [[API TYPE UnitId|UnitId]] values. One can also use the [[API TargetUnitsPet|TargetUnitsPet("unit")]] function to target a pet.
 
: The id <tt>"player"</tt> refers to the character in use.
 
: The <tt>"party*"</tt> ids refer to the corresponding party members.
 
: The <tt>"pet"</tt> id should work too, and will (if it works) target the players pet --[[User:Sarf|Sarf]]


{{Template:WoW API}}
{{Template:WoW API}}
[[Category:API Targetting Functions|TargetUnit]]
[[Category:API Unit Functions|TargetUnit]]
Anonymous user