WoW:API DoEmote: Difference between revisions
Jump to navigation
Jump to search
(Added an example for the target as the previous information was incorrect (not the player name, but the word 'target' or 'targettarget')) |
m (Move page script moved page API DoEmote to API DoEmote without leaving a redirect) |
||
(6 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} | {{wowapi}}__NOTOC__ | ||
DoEmote("token" [,"target"]); | |||
DoEmote("token", " | |||
<!-- 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 --> | ||
== Parameters == | |||
=== Arguments=== | |||
:("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 === | |||
:;nil | |||
== Usage == | |||
=== Example === | |||
DoEmote("cry"); -- Say you have 'Bob' selected. You see: You cry on Bob's shoulder. | |||
-- If you have no target, you see: You cry. | |||
DoEmote("cry","none"); -- Regardless of whether or not you have Bob selected, you will see: | |||
-- You cry. | |||
=== Notes === | |||
* Executes one of the emotes based on the given token, including vocal emotes and animations. 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 goes up to ChatFrame.lua's local variable MAXEMOTEINDEX (which is 452 in WotLK 3.3.0). | |||
* Emotes in TextEmoteSpeechList will trigger vocal 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. |
Latest revision as of 04:45, 15 August 2023
DoEmote("token" [,"target"]);
Parameters[edit]
Arguments[edit]
- ("token" [, "target"])
- token
- String - the token that describes which emote is being used. See 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[edit]
- nil
Usage[edit]
Example[edit]
DoEmote("cry"); -- Say you have 'Bob' selected. You see: You cry on Bob's shoulder. -- If you have no target, you see: You cry. DoEmote("cry","none"); -- Regardless of whether or not you have Bob selected, you will see: -- You cry.
Notes[edit]
- Executes one of the emotes based on the given token, including vocal emotes and animations. The list of currently valid emotes is given in ChatFrame.lua, defined as one of the EMOTEx_TOKEN constants. x starts at 1 and goes up to ChatFrame.lua's local variable MAXEMOTEINDEX (which is 452 in WotLK 3.3.0).
- Emotes in TextEmoteSpeechList will trigger vocal 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.