Skip to content
M2O Scripting APIScripting reference
Runtime classServer APIGenerated

SpikeStrip

Defined in: server/api.d.ts:1869

Replicated tyre spike strip that can be enabled or disabled by the server.

new SpikeStrip(id): SpikeStrip

Defined in: server/api.d.ts:1874

Creates a script wrapper for an existing spike strip with this ID; use SpikeStrip.create() to create one.

number

Network entity identifier.

SpikeStrip

Entity.constructor

destroy(): void

Defined in: server/api.d.ts:1900

Destroys this replicated spike strip.

void


setEnabled(enabled): void

Defined in: server/api.d.ts:1906

Sets whether this spike strip is active.

boolean

True to activate tyre puncturing; false to disable it.

void


setVirtualWorld(world): void

Defined in: server/api.d.ts:4154

Moves this entity into another virtual world.

number

Virtual-world identifier used to partition replication and visibility.

void

Entity.setVirtualWorld


setVisibleTo(player): void

Defined in: server/api.d.ts:4160

Restricts replication of this entity to one owning connection while preserving normal range and visibility checks.

Entity | null

Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.

void

Entity.setVisibleTo


toString(): string

Defined in: server/api.d.ts:1895

Returns a readable representation of this spike strip.

string

The spike-strip ID formatted for logging or debugging.

Entity.toString


static create(x, y, z, length?, heading?, virtualWorld?): SpikeStrip

Defined in: server/api.d.ts:1918

Creates and replicates an enabled tyre spike strip.

number

Initial world-space X coordinate.

number

Initial world-space Y coordinate.

number

Initial world-space Z coordinate.

number

Optional physical strip length in world units.

number

Optional world-space heading angle.

number

Optional virtual-world ID used for visibility filtering.

SpikeStrip

The newly created spike-strip handle.

readonly enabled: boolean

Defined in: server/api.d.ts:1889

Whether tyre puncturing is active.


readonly heading: number

Defined in: server/api.d.ts:1884

World-space heading angle.


readonly id: number

Defined in: server/api.d.ts:4122

Immutable network entity identifier.

Entity.id


readonly length: number

Defined in: server/api.d.ts:1879

Physical strip length in world units.


position: Vector3

Defined in: server/api.d.ts:4132

Authoritative world-space position; assignment forces replicated state.

Entity.position


rotation: Vector3 | Quaternion

Defined in: server/api.d.ts:4137

Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.

Entity.rotation


readonly state: StateBag

Defined in: server/api.d.ts:4142

Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.

Entity.state


readonly virtualWorld: number

Defined in: server/api.d.ts:4127

Current virtual-world identifier.

Entity.virtualWorld