Skip to content
M2O Scripting APIScripting reference
Global objectClient APIGenerated

Lift

const Lift: object

Defined in: client/api.d.ts:1611

Reads the game’s lifts this client has streamed in, and asks the server to send one to a floor. The server decides every move, so a lift only moves once the server accepts the request; the same move then plays for every player.

call(liftId, floor): boolean

Asks the server to send a lift to a floor, as pressing one of its buttons does: the server refuses a lift that is disabled, still moving, or more than 30 m from the player. Lets a script offer a floor menu for a lift with more than two floors.

string

Lift id.

number

Floor to send the lift to, 0 being the lowest.

boolean

True when the request was sent; false when not connected, for an unknown lift id, or a floor out of range.

get(liftId): LiftView | null

Reads one lift.

string

Lift id.

LiftView | null

The lift, or null when this client does not have it streamed in.

getStreamed(): LiftView[]

Lists the lifts this client has streamed in.

LiftView[]

Every streamed-in lift.