Function; SobGroup_GetActualSpeed - HWRM/KarosGraveyard GitHub Wiki
SobGroup_GetActualSpeed(sGroupName)
Description
Returns the 'actual', current average speed of the ships in sGroupName
, squared.
To get a more intuitive value, take the sqrt
of this function's return.
Note: Many things can effect a ship's speed, including its stance and formation. You can see that all homeworld 2 strikecraft are slightly slower than advertised since they travel in formations (which slow them down a little).
Example
-- `"my-kus-interceptor"` being a single kushan interceptor travelling at max speed:
local speed_sq = SobGroup_GetActualSpeed("my-kus-interceptor");
print(speed_sq); -- ~237169
print(sqrt(speed_sq)); -- 487, which is the max speed as defined in `kus_interceptor.ship`
Arguments
Param | Type | Description |
---|---|---|
sGroupName |
string |
The sobgroup who's instantaneous speed (squared) will be returned. |