Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Global objectClient APIGenerated

Follow

const Follow: object

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

Follow another player or a streamed human NPC using the local player’s native walking or riding action. Native combat, interaction and mount restrictions still apply. Only one scripted follow can be queued or active. Movement input, target loss, mount changes and resource shutdown stop it. This controls only the local player; it does not command an NPC to follow.

canStart(target): boolean

Checks the target and native follow restrictions, including the game’s start distance.

Player | FollowTarget

A remote player handle or a descriptor from targets().

boolean

getTarget(): FollowTarget | null

The active scripted follow target, or null while idle or pending.

FollowTarget | null

isPending(): boolean

Whether a scripted follow is queued but has not entered yet.

boolean

start(target): boolean

Queues native follow for the calling resource. True means queued; followStarted confirms entry. False means the request was refused.

Player | FollowTarget

Who the local player should follow.

boolean

stop(): void

Cancels the calling resource’s queued or active follow. Other resources’ follow actions are left alone.

void

targets(): FollowTarget[]

Lists streamed players and human NPCs within 20 metres. Use canStart to check whether one can currently be followed.

FollowTarget[]