Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Runtime classClient APIGenerated

Entity

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

Base handle for a live replicated network entity.

new Entity(id): Entity

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

Creates a script wrapper for an existing entity with this ID; it does not spawn an entity.

number

Network entity identifier.

Entity

toString(): string

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

Formats this entity handle for logging and debugging.

string

Text containing the network entity ID.

readonly id: number

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

Immutable network entity identifier.


position: Vector3

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

Authoritative world-space position; assignment forces replicated state.


rotation: Vector3 | Quaternion

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

Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.


readonly state: StateBag

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

Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.


readonly virtualWorld: number

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

Current virtual-world identifier.