WoW:API GetUnitSpeed: Difference between revisions
Jump to navigation
Jump to search
(New page: This is a work in progress... When the unit is not moving this returns 0<BR/> When the unit is on a moving object such as a boat that's moving this returns 0<BR/> When the unit is running...) |
No edit summary |
||
| Line 5: | Line 5: | ||
When the unit is running at 100% (running on foot with no speed increase enhancements) this returns 7<BR/> | When the unit is running at 100% (running on foot with no speed increase enhancements) this returns 7<BR/> | ||
When the unit is running at 175% (Death Knight home city) this returns 12.25<BR/> | When the unit is running at 175% (Death Knight home city) this returns 12.25<BR/> | ||
When the unit is running at 200% (Epic Mount) this returns 14 | |||
7 * 1.75 = 12.25 so apparently 7 = 100%, for example: | |||
s = string.format("%d", (GetUnitSpeed("Player") / 7) * 100); | |||
will put the speed in % into the variable s. | |||
Revision as of 22:50, 21 November 2008
This is a work in progress...
When the unit is not moving this returns 0
When the unit is on a moving object such as a boat that's moving this returns 0
When the unit is running at 100% (running on foot with no speed increase enhancements) this returns 7
When the unit is running at 175% (Death Knight home city) this returns 12.25
When the unit is running at 200% (Epic Mount) this returns 14
7 * 1.75 = 12.25 so apparently 7 = 100%, for example:
s = string.format("%d", (GetUnitSpeed("Player") / 7) * 100);
will put the speed in % into the variable s.