WoW:API DoEmote: Difference between revisions

m
Formatting
mNo edit summary
m (Formatting)
Line 3: Line 3:
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->


DoEmote("token"[, "target"]);
DoEmote("token"[, "player"]);


<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
Line 13: Line 13:
<!-- List each argument, together with its type -->
<!-- List each argument, together with its type -->


:("token", "target")
:("token", "player")
:;token : String - the token that describes which emote is being used.  See [[API_TYPE_Emotes_Token|Emotes Tokens]]
:;token : String - the token that describes which emote is being used.  See [[API_TYPE_Emotes_Token|Emotes Tokens]]
:;target : String - target for the emote.  For example: DoEmote("dance", "target") will cause you to dance with your target. Takes a [[UnitId|unit]] token.
:;target : Any - if a string or number is set for this argument, the emote will behave as if no target were selected.


----
----
Line 28: Line 28:
<!-- Details not appropriate for the main description can go here -->
<!-- Details not appropriate for the main description can go here -->
: Executes one of the emotes based on the given token, including vocal emotes.  The list of currently valid emotes is given in ChatFrame.lua, defined as one of the EMOTE''x''_TOKEN constants.  ''x'' starts at 1 and currently goes up to 171 (as of 2.1.2).  Certain emotes may also trigger character animations and sound effects.
: Executes one of the emotes based on the given token, including vocal emotes.  The list of currently valid emotes is given in ChatFrame.lua, defined as one of the EMOTE''x''_TOKEN constants.  ''x'' starts at 1 and currently goes up to 171 (as of 2.1.2).  Certain emotes may also trigger character animations and sound effects.
: As of August 21, 2008 (2.4.3), if the function has only the first argument, it automatically produces a targeted emote if a target exists or a non-targeted emote if none exists.  Supplying a string or number to the "target" argument appears to force the function to behave as if no target were selected, regardless of an actual target.
Anonymous user