Class HornPart

Represents a horn.

Hierarchy

  • Child

    Hierarchy

    • HornPart

Constructors

Properties

fileChild: FileChild
fileShape: FileShape

Accessors

  • get color(): string
  • The color of this shape.

    Returns string

  • set color(value: string): void
  • Parameters

    • value: string

    Returns void

  • get pitch(): number
  • The pitch of the horn.

    Note

    Attempting to get this property from a horn in a blueprint saved in-game, without first setting it with this API, has a chance to return 0 instead of the actual pitch. This is due to some shenanigans with the way horn pitches are stored within serialized Lua data.

    Returns number

  • set pitch(value: number): void
  • Parameters

    • value: number

    Returns void

  • get shapeId(): string
  • The shapeId of this shape. Determines the model and behavior in-game.

    Returns string

  • set shapeId(value: string): void
  • Parameters

    • value: string

    Returns void

Methods

  • Connects this child to another child. Both children must be interactable.

    Parameters

    • other: number | Child

      The Child object or the ID of the child to connect to.

    Returns void

  • Disconnects this child from another child.

    Parameters

    • other: number | Child

      The Child object or the ID of the child to disconnect from.

    Returns void

  • Attempts to convert a Child to a HornPart. Only returns if the Child's file object is a HornPart.

    Returns

    The converted HornPart, or undefined if the Child is not a HornPart.

    Parameters

    • potential: Child

      The Child to convert.

    Returns undefined | HornPart

  • Creates a horn.

    Returns

    The created horn.

    Parameters

    • position: Vector3

      The position of the horn.

    • rotation: Axis

      The rotation of the horn.

    • Optional color: string

      The color of the horn. Fallbacks to the horn's default color.

    • pitch: number = 0

      The pitch of the horn. Defaults to 0.

    Returns HornPart

Generated using TypeDoc