#Max Movement Speed WA

16 messages · Page 1 of 1 (latest)

safe oak
#

This function works perfect but doesn't register Dragonflying speed. Auto puts 420% while i'm airbourne which is just max normal flying speed. Is there an easy way to add Dragonflying to this or should I let it go

    local _, runSpeed, flightSpeed, swimSpeed = GetUnitSpeed("player");
    local speed;
    if IsFlying() == true then
        speed = flightSpeed;
    elseif IsSwimming() == true then
        speed = swimSpeed;
    else
        speed = runSpeed;
    end
    return string.format("%.0f", (speed / 7) * 100);
end```
#

sorry not sure how you guys do the fancy dark background for code in discord

cunning belfry
#

Enclose it in ```

#

For dagonflying speeds etc. just look at the existing auras for that

#

I just looked at a random one, and it actually calculates speed by distance travelled over time manually, instead of simply checking some value

#

Which is more involved obviously on your end, I'd just let it be

rotund plinth
cunning belfry
#

GG, says it's even added in 10.0.5

#

That poor dagonflying aura author did all that work for nothing (or the function is lacking in some way)

rotund plinth
#

yeah the old getspeed will not give you new dynamic flight speed

#

the only issue with GetGlidingInfo is that it will return 0 if you fly straightup or down

#

you gotta do a bit of math if you want your speed regardless of direction

cunning belfry
#

Ah, that's probably why he did the workaround of manually calculating the speed

rotund plinth
#

the example on the GetGlidingInfo page does it for you

cunning belfry
#

Oh, so GetUnitSpeed returns something useful while dynamic flying after all then?
Because it shows that in percent if GetGlidingInfo returns false, which I guess is the case when you go straight down or up as you said