Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API GetUnitSpeed
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} __NOTOC__ Added with WoW 3.0 {{wotlk-inline}} ==Usage== Returns a value representing the moving speed of a unit. value = GetUnitSpeed("[[UnitId|unit]]") == Parameters == === Arguments === :;unit : String - The [[unitId]] for which the speed information is returned. This has not been tested with all units but does work for "Player" units. === Returns === :;value : Number - value of the unit speed ==== Examples ==== Player unit moving at 100% -- value = 7<BR/> Player unit moving at 175% -- value = 12.25<BR/> Player unit moving at 200% -- value = 14<BR/> == Misc. Calculations == 7 * 1.75 = 12.25 so apparently 7 = 100% For example, the following will put the speed in % into the variable s. s = string.format("%d", (GetUnitSpeed("Player") / 7) * 100);
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wotlk-inline
(
edit
)
Template:Wowapi
(
edit
)