Marker
Defined in: server/api.d.ts:1244
Replicated world marker that can emit markerHit and markerLeave events.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Marker(
id):Marker
Defined in: server/api.d.ts:1249
Creates a script wrapper for an existing marker with this ID; use Marker.create() to create a marker.
Parameters
Section titled “Parameters”number
Network entity identifier.
Returns
Section titled “Returns”Marker
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”destroy()
Section titled “destroy()”destroy():
void
Defined in: server/api.d.ts:1280
Destroys this replicated marker and removes it from connected clients.
Returns
Section titled “Returns”void
setColor()
Section titled “setColor()”setColor(
r,g,b):void
Defined in: server/api.d.ts:1294
Changes the marker’s replicated RGB color.
Parameters
Section titled “Parameters”number
Red color component.
number
Green color component.
number
Blue color component.
Returns
Section titled “Returns”void
setScale()
Section titled “setScale()”setScale(
scale):void
Defined in: server/api.d.ts:1286
Changes the marker’s replicated visual scale.
Parameters
Section titled “Parameters”number
Uniform visual scale applied to the marker model.
Returns
Section titled “Returns”void
setTriggerRadius()
Section titled “setTriggerRadius()”setTriggerRadius(
radius):void
Defined in: server/api.d.ts:1300
Changes the radius used to emit marker contact events.
Parameters
Section titled “Parameters”radius
Section titled “radius”number
Contact radius in world units.
Returns
Section titled “Returns”void
setVirtualWorld()
Section titled “setVirtualWorld()”setVirtualWorld(
world):void
Defined in: server/api.d.ts:4154
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:4160
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:1275
Returns a readable representation of this marker.
Returns
Section titled “Returns”string
The marker ID formatted for logging or debugging.
Inherited from
Section titled “Inherited from”create()
Section titled “create()”
staticcreate(x,y,z,model?,virtualWorld?,triggerRadius?):Marker
Defined in: server/api.d.ts:1312
Creates and replicates a world marker.
Parameters
Section titled “Parameters”number
Initial world-space X coordinate.
number
Initial world-space Y coordinate.
number
Initial world-space Z coordinate.
model?
Section titled “model?”number
Optional marker model identifier.
virtualWorld?
Section titled “virtualWorld?”number
Optional virtual-world ID used for visibility filtering.
triggerRadius?
Section titled “triggerRadius?”number
Optional radius for markerHit and markerLeave events.
Returns
Section titled “Returns”Marker
The newly created marker handle.
Properties
Section titled “Properties”
readonlycolor:number
Defined in: server/api.d.ts:1264
Packed replicated marker color.
readonlyid:number
Defined in: server/api.d.ts:4122
Immutable network entity identifier.
Inherited from
Section titled “Inherited from”
readonlymodel:number
Defined in: server/api.d.ts:1254
Replicated marker model identifier.
position
Section titled “position”position:
Vector3
Defined in: server/api.d.ts:4132
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:4137
Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.
Inherited from
Section titled “Inherited from”
readonlyscale:number
Defined in: server/api.d.ts:1259
Current uniform visual scale.
readonlystate:StateBag
Defined in: server/api.d.ts:4142
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”triggerRadius
Section titled “triggerRadius”
readonlytriggerRadius:number
Defined in: server/api.d.ts:1269
Radius used for player contact events, in world units.
virtualWorld
Section titled “virtualWorld”
readonlyvirtualWorld:number
Defined in: server/api.d.ts:4127
Current virtual-world identifier.
