Skip to main content

Boatringdata

Overview

This component stores data defining the appearance of a ring-like visual effect, commonly associated with boats. It holds properties for the ring's radius, the number of segments it is composed of, and a networked boolean to track whether the ring is currently rotating.

Dependencies & Tags

None identified.

Properties

PropertyTypeDefault ValueDescription
radiusnumber4The radius of the ring effect.
segmentsnumber8The number of segments used to draw the ring.
_isrotatingnet_boolfalseA networked variable that tracks if the ring is in a rotating state.

Main Functions

SetRadius(radius)

  • Description: Sets the radius of the ring.
  • Parameters:
    • radius (number): The new radius value.

SetNumSegments(segments)

  • Description: Sets the number of segments that compose the ring.
  • Parameters:
    • segments (number): The new number of segments.

IsRotating()

  • Description: Returns the current rotation state of the ring. This value is synchronized between the server and clients.
  • Returns: (boolean) true if the ring is rotating, otherwise false.

SetIsRotating(isrotating)

  • Description: Sets the rotation state of the ring. This function can only be called on the master simulation (server). The state change is automatically synchronized to all clients.
  • Parameters:
    • isrotating (boolean): The new rotation state. Set to true to enable rotation, false to disable it.