Area
A box or sphere your gamemode marked out with areas.create, as areas.listAll,
areas.getById, playerEnteredArea and
playerLeftArea give it. It does not change; read it again for a newer one.
Renamed in 0.28 from Zone and ZoneSettings; see renamed names.
Definition
Section titled “Definition”type Area = Readonly<{ markerKind: "area"; id: number; colorRgba: number; interior: number; virtualWorld: number; visible: boolean; players: readonly number[] | null;} & ({ shape: "box"; min: Vector3; max: Vector3 } | { shape: "sphere"; position: Vector3; radius: number })>;
type AreaSettings = MarkerTargeting & { colorRgba?: number } & ({ min: Vector3; max: Vector3 } | { position: Vector3; radius: number });Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
markerKind |
"area" |
Tells it apart from the other world markers. |
id |
number |
Its ID. |
shape |
"box" | "sphere" |
Which of the two it is. |
min, max |
Vector3 |
A box’s two corners. |
position, radius |
Vector3, number |
A sphere’s centre and radius in metres. |
colorRgba |
number |
A box’s color on the radar and the map, 0xRRGGBBAA; 0 for none. |
interior, virtualWorld, visible, players |
Who it is for; see MarkerTargeting. players holds player IDs, or null for everyone. |
AreaSettings takes a box (min, max) or a sphere (position, radius), and the rest optional; the defaults are on
areas.create.
Related
Section titled “Related”areas.create: make onePlayerAreaPayload: what its events get- World markers