WoW:UnitId: Difference between revisions

352 bytes added ,  16 October 2007
m (Removed " or <tt>"NPC"</tt>" since tokens are not case sensitive. Added "Others" section. Added stuff under "player".)
Line 32: Line 32:


; <tt>"npc"</tt> : The NPC with which the player is currently interacting.
; <tt>"npc"</tt> : The NPC with which the player is currently interacting.
You can also use the name of a party or raid member as a unit ID:
; <tt>"''name''"</tt> : This must be spelled exactly and will be invalid if the named player is not a part of your party or raid.


== Targets ==
== Targets ==


You can append the suffix <tt>target</tt> to any UnitId to get a UnitId which refers to that unit's target (e.g. <tt>"partypet2target"</tt>). This appending can be repeated indefinitely (e.g. <tt>"playertargettarget"</tt>), though you will observe an attendant performance hit if you overdo it, as the game engine has to jump from target to target.
You can append the suffix <tt>target</tt> to any UnitId to get a UnitId which refers to that unit's target (e.g. <tt>"partypet2target"</tt>). This appending can be repeated indefinitely (e.g. <tt>"playertargettarget"</tt>), though you will observe an attendant performance hit if you overdo it, as the game engine has to jump from target to target.
If you are using a party or raid member's name as a unit, you need to use hyphens to separate the target chain (e.g. <tt>"Cogwheel-target-target"</tt>).


== Notes ==
== Notes ==
Anonymous user