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

SiegeLadder

Defined in: server/api.d.ts:6030

Replicated handle for a siege ladder leaning on a wall.

new SiegeLadder(id): SiegeLadder

Defined in: server/api.d.ts:6035

Creates a script wrapper for an existing siege ladder with this ID; use SiegeLadder.spawn() to place one.

number

Network entity identifier.

SiegeLadder

Entity.constructor

break(): void

Defined in: server/api.d.ts:6090

Breaks the ladder: it lies in pieces where it stands, anyone on it falls, and nothing raises it until repair.

void


destroy(): void

Defined in: server/api.d.ts:6100

Removes the ladder on every client after emitting siegeLadderDestroy.

void


push(player?): SiegeResult

Defined in: server/api.d.ts:6078

Pushes a standing ladder off its wall. It stands through the swing, falls away from the wall as the blade meets it – throwing off anyone climbing it – and lies where it lands, about 4.5 seconds later.

number | Player | null

Who pushes it: they play the game’s own halberd push, and are credited with it in siegeLadderFall.

SiegeResult

What happened, and the phrase to explain it with when nothing did.


raise(player?): SiegeResult

Defined in: server/api.d.ts:6085

Lays a fallen ladder back against its wall, over the lift’s 5.7 seconds.

number | Player | null

Who raises it: they play the game’s own ladder lift.

SiegeResult

What happened, and the phrase to explain it with when nothing did.


repair(): void

Defined in: server/api.d.ts:6095

Puts a fallen or broken ladder back against its wall at once.

void


setVirtualWorld(world): void

Defined in: server/api.d.ts:8797

Moves this entity into another virtual world.

number

Virtual-world identifier used to partition replication and visibility.

void

Entity.setVirtualWorld


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.

Entity | null

Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.

void

Entity.setVisibleTo


toString(): string

Defined in: server/api.d.ts:6071

Formats this ladder handle for logging and debugging.

string

The ladder ID, its kind and its pose.

Entity.toString


static all(virtualWorld?): SiegeLadder[]

Defined in: server/api.d.ts:6124

Lists the siege ladders the server has.

number

Optional virtual world to list; omitted lists every one.

SiegeLadder[]

One handle per ladder, in no particular order.


static describe(kind): SiegeLadderKind | null

Defined in: server/api.d.ts:6117

What one kind of ladder is: its mesh, its climb and its lean – what a placement preview needs to show it as it will stand.

string

siege, tall, short or low.

SiegeLadderKind | null

The kind, or null for a name that is not one.


static destroyAll(virtualWorld?): number

Defined in: server/api.d.ts:6138

Removes siege ladders, emitting siegeLadderDestroy for each one.

number

Optional virtual world to clear; omitted clears every one.

number

How many were removed.


static getById(id): SiegeLadder | null

Defined in: server/api.d.ts:6131

Looks a ladder up by its network entity ID.

number

Network entity identifier.

SiegeLadder | null

The ladder’s handle, or null when no live ladder has that ID.


static spawn(kind, position, rotation?, virtualWorld?): SiegeLadder

Defined in: server/api.d.ts:6110

Places one of the game’s own ladders leaning on a wall, the way the Suchdol and Nebakov sieges stand theirs: the game’s climb, and the game’s step off over the palisade at its top, which wants the top a little over the walk.

string

siege, tall, short or low.

Vector3 | Partial<Vector3>

Where its foot stands, on the ground below the wall.

Vector3 | Quaternion

Its facing: forward is the way to the wall it leans on. A Quaternion, or a Vector3 of Euler angles in degrees.

number

Optional virtual world the ladder belongs to; omitted puts it in the global one.

SiegeLadder

The new ladder’s handle.

readonly climbable: boolean

Defined in: server/api.d.ts:6055

Whether the game’s own climb is offered on it: while it stands and nobody has started to push it.


readonly height: number

Defined in: server/api.d.ts:6050

How far up its rungs go, in metres: its top rests this high above its foot on the wall’s top. Pick the kind whose height meets the walk.


readonly id: number

Defined in: server/api.d.ts:8765

Immutable network entity identifier.

Entity.id


readonly kind: string

Defined in: server/api.d.ts:6040

Which of the game’s ladders it is: siege (the Suchdol siege ladder, 9.75 m), tall (5.5 m), short (3.25 m) or low (2 m).


readonly pose: string

Defined in: server/api.d.ts:6045

standing against its wall, pushed (a defender’s swing, then its fall), down, raising or broken. Named pose because every entity already has a state, which is its state bag.


position: Vector3

Defined in: server/api.d.ts:8775

Authoritative world-space position; assignment forces replicated state.

Entity.position


readonly pusher: Player | null

Defined in: server/api.d.ts:6065

Who last pushed it, or null.


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.

Entity.rotation


readonly state: 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.

Entity.state


usable: boolean

Defined in: server/api.d.ts:6060

Whether players are offered the push at its top and the raise at the foot of a fallen one, each raising siegeLadderUse first. On by default. The climb is the game’s and is offered whenever the ladder stands.


readonly virtualWorld: number

Defined in: server/api.d.ts:8770

Current virtual-world identifier.

Entity.virtualWorld