m
→Arguments: More clarification on "target"
(Added clarification on local variable, updated max number of emotes.) |
m (→Arguments: More clarification on "target") |
||
| Line 1: | Line 1: | ||
{{wowapi}}__NOTOC__ | {{wowapi}}__NOTOC__ | ||
DoEmote("token" [, | DoEmote("token" [,"target"]); | ||
<!-- 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 8: | Line 8: | ||
=== Arguments=== | === Arguments=== | ||
:("token", | :("token" [, "target"]) | ||
:;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 - [[UnitId]] of who the emote will be performed on. If nil, then it performs the emote on your current target, or yourself if you don't have a target. If the specified target does not exist or is out of range, then it performs the emote on yourself. | ||
=== Returns === | === Returns === | ||
| Line 23: | Line 23: | ||
DoEmote("cry"); -- Say you have 'Bob' selected. You see: You cry on Bob's shoulder. | DoEmote("cry"); -- Say you have 'Bob' selected. You see: You cry on Bob's shoulder. | ||
-- If you have no target, you see: You cry. | -- If you have no target, you see: You cry. | ||
DoEmote("cry", | DoEmote("cry","none"); -- Regardless of whether or not you have Bob selected, you will see: | ||
-- You cry. | -- You cry. | ||
| Line 32: | Line 32: | ||
* Emotes in EmoteList will trigger animation effects. (defined in ChatFrame.lua) | * Emotes in EmoteList will trigger animation effects. (defined in ChatFrame.lua) | ||
* It is unclear whether two these lists contain all valid animation or speech effects, however. | * It is unclear whether two these lists contain all valid animation or speech effects, however. | ||