IsSwimming
Jump to navigation
Jump to search
Returns true if the specified unit is currently swimming.
isSwimming = IsSwimming(unit)
Arguments
- unit
- string? : UnitToken - A unitID to query. Defaults to player if omitted.
Returns
- isSwimming
- boolean - True if the unit is swimming, false otherwise.
Details
- A swimming character's movement speed is based on their swim speed (per GetUnitSpeed).
- In some locations and when affected by certain effects, player characters can run at the bottom of the ocean/lake/etc. In those cases, the player is not considered swimming (but is still submerged per IsSubmerged).
- This function is available within the RestrictedEnvironment