Skip to content
ASArcaneMP Scripting APIScripting reference
Global objectClient APIGenerated

Shapes

const Shapes: object

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

World-space shapes drawn on this client only: rings, spheres, boxes, cylinders, polygons and lines, for areas, previews and markers. They are real geometry, so walls hide them, and see-through when their alpha is under 1. Keys belong to the calling resource, and its shapes go when it stops.

create(key, shape): boolean

Creates or replaces a shape. It appears on the next frame, and comes back by itself after a level change. Throws a TypeError on a bad shape, and an Error at 1024 shapes on this client.

string

Stable key, at most 128 characters; creating again replaces the shape.

ShapeOptions

The shape and how it looks.

boolean

true

destroy(key): boolean

Destroys a shape.

string

Key passed to create.

boolean

false when no shape has the key

destroyAll(): number

Destroys every shape this resource made.

number

How many there were.

get(key): ShapeOptions | null

A shape’s fields as they stand, defaults filled in, or null.

string

Key passed to create.

ShapeOptions | null

keys(): string[]

Keys of this resource’s shapes.

string[]

setVisible(key, visible): boolean

Shows or hides a shape.

string

Key passed to create.

boolean

false hides it without destroying it.

boolean

false when no shape has the key

update(key, changes): boolean

Changes some of a shape’s fields; the rest keep their values. Moving or recoloring is cheap; changing its size rebuilds it. Throws like create.

string

Key passed to create.

Partial<ShapeOptions>

Only the fields to change; the type can’t change.

boolean

false when no shape has the key