Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Data shapeServer APIGenerated

PatrolRouteDefinition

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

The format saved by World Builder and accepted by PatrolRoute.create.

id: string

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

Stable globally unique id, up to 128 bytes. Use a namespace such as town.guard-loop.


optional mode?: "once" | "loop" | "pingPong"

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

Defaults to loop. Ping-pong visits each endpoint once per turn.


optional name?: string

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

Display name, up to 256 bytes.


points: PatrolPoint[]

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

1 to 256 ordered waypoints.


optional radius?: number

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

Default arrival radius; 1.5 metres when omitted.


optional speed?: "walk" | "jog" | "run"

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

Default leg speed; walk when omitted.


optional waitSeconds?: number

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

Default arrival wait, 0 to 3600; defaults to zero.