Returns a unit's current speed. Valid for all observable units. Values returned indicate the current movement speed in yards per second. (It's not relative to facing or ground position; i.e. you won't see a smaller value when flying up at an angle or a negative value when backing up.) Does not indicate falling speed or the speed of boats, zeppelins, and some forms of quest-related transportation, but does indicate current speed on taxi flights and when moving due to combat effects such as Disengage, Death Grip, or various knockback abilities.

Examples (actual results will vary based on terrain, pitch, etc.):

  • Walking: 2.5
  • Running backwards: 4.5
  • Normal Running: 7
  • Ground Mount, 60% speed (Apprentice): 11.2
  • Ground Mount, 100% speed (Journeyman): 14
  • Flying Mount, 150% speed (Expert): 17.5
  • Flying Mount, 280% speed (Artisan): 26.6
  • Flying Mount, 310% speed (Master): 28.7

Divide the result by BASE_MOVEMENT_SPEED and multiply by 100 to get a percentage of normal run speed.


See also Unit functions.

Signature:

speed, groundSpeed, flightSpeed, swimSpeed = GetUnitSpeed(unit)

Arguments:

  • unit - Unit to query (unitid)

Returns:

  • speed - Unit's current speed in yards per second (number)
  • groundSpeed - Unit's maximum possible ground speed with current buffs (number)
  • flightSpeed - Unit's maximum possible flight speed with current buffs (number)
  • swimSpeed - Unit's maximum possible swim speed with current buffs (number)