Follow

Makes the local player follow another player or a server NPC with the game's follow action. One follow is queued or running at a time. It ends with Follow.stop(), a movement key, the target going, the game ending it, or the resource stopping. Events are followStarted and followStopped.

follow.targets()

Follow.targets()

Who can be followed: players and NPCs within 20 m.

follow.canStart()

Follow.canStart(target)

Whether a follow could start now, by the game's checks and the start distance.

follow.start()

Follow.start(target, options)

Queues a follow. followStarted fires when the game's action is running.

follow.getTarget()

Follow.getTarget()

Who is being followed. Null if nobody, or if a follow is only queued; see isPending.

follow.isPending()

Follow.isPending()

Whether a follow is queued but the game's action has not started.

follow.stop()

Follow.stop()

Ends the follow with the reason 'script'.