SixL client API / colshapes / ColshapeMp

Interface: ColshapeMp

A colshape this client made: a circle, a cuboid, a rectangle, a sphere or a tube.

Remarks

Partial: checked against the local player only (another player's crossing is not reported), each frame, in the colshape's dimension. Circle and rectangle ignore height; a tube rises from its position by its height; cuboid and rectangle are centred on their position. Not yet confirmed in the game.

Example

const zone = mp.colshapes.newSphere(10, 20, 30, 5);

Properties

dimension

dimension: number

The dimension the colshape is in: the local player triggers it only in the same one.

Example

zone.dimension = 0;

id

readonly id: number

The colshape's number on this client.

Example

const id = zone.id;

position

position: Vector3

The colshape's position (its centre, or the bottom of a tube).

Example

const at = zone.position;

remoteId

readonly remoteId: number

Always -1: the server does not know a client's colshape.

Example

const local = zone.remoteId === -1;

triggered

triggered: boolean

Whether the local player is inside the colshape now.

Remarks

Partial: the answer of the latest frame. Not yet confirmed in the game.

Example

if (zone.triggered) { }

Methods

destroy()

destroy(): void

Removes the colshape. A player inside it gets no exit event.

Returns

void

Example

zone.destroy();