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

Entity

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

Base handle for a live replicated network entity.

new Entity(id): Entity

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

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:5792

Formats this entity handle for logging and debugging.

string

Text containing the network entity ID.

readonly id: number

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

Immutable network entity identifier.


position: Vector3

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

Authoritative world-space position; assignment forces replicated state.


rotation: Vector3 | Quaternion

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

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:5786

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:5771

Current virtual-world identifier.