• Create a crater at the given coordinates.

    Parameters

    • x: number

      The x coordinate of the craters center.

    • y: number

      The y coordinate of the craters center.

    • radius: number

      The radius of the crater.

    • depth: number

      The depth of the crater.

    • duration: number

      The duration in milliseconds.

    • permanent: boolean

      Make the deformation permanent.

    Returns HandleHolder<"terraindeformation">

    Note

    To approximate the resulting height of a point distance units away from the center point (x, y) you can use the following formula: Cos(bj_PI/2 * distance / radius) * -depth. See this issue for some more information.

    Note

    Not every player might display those transformations due to graphics settings. Thus reading data like terrain height might lead to async values. See the other note on a way to compute an appropiate height to use instead.

    Note

    Permanent terrain deformations are not present in saved game files.

Generated using TypeDoc