M2O Scripting APIScripting reference
    Preparing search index…
    ClassServer API

    Marker

    Replicated world marker that can emit markerHit and markerLeave events.

    Hierarchy

    • Entity
      • Marker
    Index
    • Creates a script wrapper for an existing marker with this ID; use Marker.create() to create a marker.

      Parameters

      • id: number

        Network entity identifier.

      Returns Marker

    • Changes the marker's replicated RGB color.

      Parameters

      • r: number

        Red color component.

      • g: number

        Green color component.

      • b: number

        Blue color component.

      Returns void

    • Changes the marker's replicated visual scale.

      Parameters

      • scale: number

        Uniform visual scale applied to the marker model.

      Returns void

    • Changes the radius used to emit marker contact events.

      Parameters

      • radius: number

        Contact radius in world units.

      Returns void

    • Parameters

      • world: number

      Returns void

    • Parameters

      • player: Entity | null

      Returns void

    • Returns a readable representation of this marker.

      Returns string

      The marker ID formatted for logging or debugging.

    • Creates and replicates a world marker.

      Parameters

      • x: number

        Initial world-space X coordinate.

      • y: number

        Initial world-space Y coordinate.

      • z: number

        Initial world-space Z coordinate.

      • Optionalmodel: number

        Optional marker model identifier.

      • OptionalvirtualWorld: number

        Optional virtual-world ID used for visibility filtering.

      • OptionaltriggerRadius: number

        Optional radius for markerHit and markerLeave events.

      Returns Marker

      The newly created marker handle.

    color: number

    Packed replicated marker color.

    id: number
    model: number

    Replicated marker model identifier.

    position: Vector3
    rotation: Vector3 | Quaternion
    scale: number

    Current uniform visual scale.

    triggerRadius: number

    Radius used for player contact events, in world units.

    virtualWorld: number