Skip to content
M2O Scripting APIScripting reference
Runtime classServer APIGenerated

ActionPoint

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

Replicated interaction point that emits actionPointHit when a player activates it.

new ActionPoint(id): ActionPoint

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

Creates a script wrapper for an existing action point with this ID; use ActionPoint.create() to create one.

number

Network entity identifier.

ActionPoint

Entity.constructor

destroy(): void

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

Destroys this replicated action point.

void


setRadius(radius): void

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

Changes the action point’s activation radius.

number

Player interaction radius in world units.

void


setTextId(textId): void

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

Changes the action point’s interaction prompt text.

number

Game localization text identifier shown at the point.

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:2188

Returns a readable representation of this action point.

string

The action-point ID formatted for logging or debugging.

Entity.toString


static create(x, y, z, radius?, textId?, virtualWorld?): ActionPoint

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

Creates and replicates an interactive action point.

number

Initial world-space X coordinate.

number

Initial world-space Y coordinate.

number

Initial world-space Z coordinate.

number

Optional player interaction radius in world units.

number

Optional game localization text identifier for the prompt.

number

Optional virtual-world ID used for visibility filtering.

ActionPoint

The newly created action-point handle.

readonly id: number

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

Immutable network entity identifier.

Entity.id


position: Vector3

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

Authoritative world-space position; assignment forces replicated state.

Entity.position


readonly radius: number

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

Current player interaction radius in world units.


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 textId: number

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

Current game localization text identifier.


readonly virtualWorld: number

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

Current virtual-world identifier.

Entity.virtualWorld