Follow
constFollow: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.
Type Declaration
Section titled “Type Declaration”canStart()
Section titled “canStart()”canStart(
target):boolean
Checks the target and native follow restrictions, including the game’s start distance.
Parameters
Section titled “Parameters”target
Section titled “target”A remote player handle or a descriptor from targets().
Returns
Section titled “Returns”boolean
getTarget()
Section titled “getTarget()”getTarget():
FollowTarget|null
The active scripted follow target, or null while idle or pending.
Returns
Section titled “Returns”FollowTarget | null
isPending()
Section titled “isPending()”isPending():
boolean
Whether a scripted follow is queued but has not entered yet.
Returns
Section titled “Returns”boolean
start()
Section titled “start()”start(
target):boolean
Queues native follow for the calling resource. True means queued; followStarted confirms entry. False means the request was refused.
Parameters
Section titled “Parameters”target
Section titled “target”Who the local player should follow.
Returns
Section titled “Returns”boolean
stop()
Section titled “stop()”stop():
void
Cancels the calling resource’s queued or active follow. Other resources’ follow actions are left alone.
Returns
Section titled “Returns”void
targets()
Section titled “targets()”targets():
FollowTarget[]
Lists streamed players and human NPCs within 20 metres. Use canStart to check whether one can currently be followed.