Marker
Defined in: server/api.d.ts:4091
Replicated ground marker handle.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Marker(
id):Marker
Defined in: server/api.d.ts:4096
Creates a script wrapper for an existing marker with this ID; use Marker.place() to draw one.
Parameters
Section titled “Parameters”number
Network entity identifier.
Returns
Section titled “Returns”Marker
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”remove()
Section titled “remove()”remove():
void
Defined in: server/api.d.ts:4152
Removes this marker from every client that can see it, after emitting markerRemove.
Returns
Section titled “Returns”void
setVirtualWorld()
Section titled “setVirtualWorld()”setVirtualWorld(
world):void
Defined in: server/api.d.ts:8797
Moves this entity into another virtual world.
Parameters
Section titled “Parameters”number
Virtual-world identifier used to partition replication and visibility.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setVisibleTo()
Section titled “setVisibleTo()”setVisibleTo(
player):void
Defined in: server/api.d.ts:8803
Restricts replication of this entity to one owning connection while preserving normal range and visibility checks.
Parameters
Section titled “Parameters”player
Section titled “player”Entity | null
Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”toString()
Section titled “toString()”toString():
string
Defined in: server/api.d.ts:4147
Formats this marker handle for logging and debugging.
Returns
Section titled “Returns”string
The marker ID, its material and its size.
Inherited from
Section titled “Inherited from”
staticall(virtualWorld?):Marker[]
Defined in: server/api.d.ts:4169
Lists every replicated marker the server currently has.
Parameters
Section titled “Parameters”virtualWorld?
Section titled “virtualWorld?”number
Optional virtual world to list; omitted lists every one of them.
Returns
Section titled “Returns”Marker[]
One handle per live marker, in no particular order.
getById()
Section titled “getById()”
staticgetById(id):Marker|null
Defined in: server/api.d.ts:4176
Looks a replicated marker up by its network entity ID.
Parameters
Section titled “Parameters”number
Network entity identifier.
Returns
Section titled “Returns”Marker | null
The marker’s handle, or null when no live marker has that ID.
list()
Section titled “list()”
staticlist(prefix?):string[]
Defined in: server/api.d.ts:4190
Every decal material the shipped game preloads, in order. Mined from the game’s own material folder at build time, so it is the same list the client has.
Parameters
Section titled “Parameters”prefix?
Section titled “prefix?”string
Keep only the names starting with this, e.g. materials/decals/burglar.
Returns
Section titled “Returns”string[]
The matching names.
place()
Section titled “place()”
staticplace(material,position?,options?,virtualWorld?):Marker
Defined in: server/api.d.ts:4162
Puts a marker in the world and leaves it there. It is a replicated entity, so the interest grid streams it to whoever comes near and takes it away again when they leave – which is what a zone or a checkpoint needs and what a one-shot message cannot do. How far it streams is taken from its own extent, between 50 and 400 metres.
Parameters
Section titled “Parameters”material
Section titled “material”string
Decal material to project, spelled as the game’s own data spells it – materials/decals/chalk_cross. Marker.list() is the whole vocabulary.
position?
Section titled “position?”Optional world-space position; omitted components default to zero.
options?
Section titled “options?”shape picks what it is made of – decal projects onto the surface under it, the rest stand in the world as meshes and can be seen from below a ridge. rotation aims it, so a marker laid on a wall is the same call with a different rotation; size and height are its extent in metres; spin and bob give a mesh marker motion; color tints it.
number
color?
Section titled “color?”number
height?
Section titled “height?”number
rotation?
Section titled “rotation?”shape?
Section titled “shape?”"decal" | "cylinder" | "sphere" | "chevron" | "cube" | "plane"
number
number
trigger?
Section titled “trigger?”boolean
virtualWorld?
Section titled “virtualWorld?”number
Optional virtual world the marker belongs to; omitted puts it in the global one.
Returns
Section titled “Returns”Marker
The newly drawn marker handle.
removeAll()
Section titled “removeAll()”
staticremoveAll(virtualWorld?):number
Defined in: server/api.d.ts:4183
Removes markers, emitting markerRemove for each one.
Parameters
Section titled “Parameters”virtualWorld?
Section titled “virtualWorld?”number
Optional virtual world to clear; omitted clears every one of them.
Returns
Section titled “Returns”number
How many markers were removed.
Properties
Section titled “Properties”bob:
number
Defined in: server/api.d.ts:4141
How far the marker rises and falls from its resting height, in metres, up to 4; 0 stands still. Played on each client’s own clock. Ignored by decal, which cannot leave the surface it projects onto.
color:
number
Defined in: server/api.d.ts:4131
Packed 0xRRGGBBAA tint, or 0 for the material as it ships. The shipped material is shared by everything that names it, so a tint is a private clone rather than a write to the original – which is why assignment rebuilds the marker.
readonlygroup:string
Defined in: server/api.d.ts:4106
Subfolder the material came out of under materials/decals/, empty at the top level.
height
Section titled “height”height:
number
Defined in: server/api.d.ts:4121
How tall a mesh marker stands, in metres, from 0.25 to 64. Ignored by decal, sphere and plane, which are sized by width alone.
readonlyid:number
Defined in: server/api.d.ts:8765
Immutable network entity identifier.
Inherited from
Section titled “Inherited from”material
Section titled “material”
readonlymaterial:string
Defined in: server/api.d.ts:4101
Decal material this marker is drawn with, e.g. materials/decals/chalk_cross. Read-only: a decal node reads its material once, so a marker is the one it was placed as.
position
Section titled “position”position:
Vector3
Defined in: server/api.d.ts:8775
Authoritative world-space position; assignment forces replicated state.
Inherited from
Section titled “Inherited from”rotation
Section titled “rotation”rotation:
Vector3|Quaternion
Defined in: server/api.d.ts:8780
Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.
Inherited from
Section titled “Inherited from”
readonlyshape:string
Defined in: server/api.d.ts:4111
What the marker is made of: decal for the projected one, or cylinder, sphere, chevron, cube or plane for a mesh standing in the world. Read-only: changing it is a rebuild, so place a new marker instead.
size:
number
Defined in: server/api.d.ts:4116
How wide the marker is, in metres, from 0.25 to 64; a value outside that is clamped into it. Assignment restates it in place rather than rebuilding, and widens how far the marker streams.
spin:
number
Defined in: server/api.d.ts:4126
Degrees per second the marker turns about its own up axis, from -720 to 720; 0 stands still. Played on each client’s own clock, so two players need not see it at the same angle. Ignored by decal.
readonlystate:StateBag
Defined in: server/api.d.ts:8785
Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.
Inherited from
Section titled “Inherited from”trigger
Section titled “trigger”trigger:
boolean
Defined in: server/api.d.ts:4136
Whether clients watch the local player against this marker’s volume and report crossings, which is what raises markerEnter and markerExit. Off by default: a marker nobody listens to should cost nothing but its draw.
virtualWorld
Section titled “virtualWorld”
readonlyvirtualWorld:number
Defined in: server/api.d.ts:8770
Current virtual-world identifier.