Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:3.7

Description

Description:

Defines a vertical offset, which is applied to the normal swimming level of units.

Effects on AI are immediate. Effects on the player are only immediate, if the offset is 0 or negative. The effect of positive offsets only becomes visible once the player swims up.

Syntax

Syntax:unit setUnitBuoyancyOffset offset
Parameters:
  • unit: Object - Player or AI unit to affect.
  • offset: Number - Vertical offset (in meters). The higher the offset, the higher the unit floats in the water.
Return Value:Nothing

Examples

Examples:
player setUnitBuoyancyOffset 0.3;

Additional Information

See also: getUnitBuoyancyOffset
Multiplayer:
Problems:

Notes