M2O Scripting APIScripting reference
    Preparing search index…
    ClassServer API

    Blocker

    Invisible replicated collision volume.

    Hierarchy

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

      Parameters

      • id: number

        Network entity identifier.

      Returns Blocker

    • Parameters

      • world: number

      Returns void

    • Parameters

      • player: Entity | null

      Returns void

    • Returns a readable representation of this blocker.

      Returns string

      The blocker ID formatted for logging or debugging.

    • Creates and replicates an invisible collision volume.

      Parameters

      • x: number

        World-space X coordinate of the volume center.

      • y: number

        World-space Y coordinate of the volume center.

      • z: number

        World-space Z coordinate of the volume center.

      • sizeX: number

        Full local width of the volume.

      • sizeY: number

        Full local depth of the volume.

      • sizeZ: number

        Full local height of the volume.

      • OptionaltypeMask: number

        Optional collision mask selecting vehicle and pedestrian blocking.

      • Optionalrotation: Vector3 | Quaternion

        Optional orientation: a Quaternion, or a Vector3 of Euler angles in radians.

      • OptionalvirtualWorld: number

        Optional virtual-world ID used for visibility filtering.

      Returns Blocker

      The newly created blocker handle.

    blockPeds: boolean

    Whether the volume blocks pedestrians and players.

    blockVehicles: boolean

    Whether the volume blocks vehicles.

    enabled: boolean

    Whether collision for this blocker is active.

    id: number
    position: Vector3
    rotation: Vector3 | Quaternion
    size: Vector3

    Full local dimensions of the collision volume.

    virtualWorld: number