Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameFollow
Syntaxfollow (followers:<entity>|...) (stop/target:<entity>) (lead:<#.#>) (max:<#.#>) (speed:<#.#>) (allow_wander) (no_teleport)
Short DescriptionCauses a list of entities to follow a target.
Full DescriptionCauses a list of entities to follow a target.

Specify the list of followers or just one. If no follower is specified, will use the linked NPC.

Specify either the target to follow, or 'stop'. If no target is specified, will use the linked player.

Use 'speed' to set the movement speed multiplier.
Use 'lead' to set how far away the follower will remain from the target (ie, it won't try to get closer than the 'lead' distance).
Use 'max' to set the maximum distance between the follower and the target before the follower will automatically start teleporting to keep up.
Use 'no_teleport' to disable teleporting when the entity is out of range (instead, the entity will simply give up).
Use 'allow_wander' to allow the entity to wander randomly.

The 'max' and 'allow_wander' arguments can only be used on non-NPC entities.
Related Tags<NPCTag.navigator.target_entity> returns the entity the npc is following.
Usage Example
# To make an NPC follow the player in an interact script.
- follow
Usage Example
# To make an NPC stop following.
- follow stop
Usage Example
# To explicitly make an NPC follow the player.
- follow followers:<npc> target:<player>
Usage Example
# To make an NPC follow the player, slowly and at distance.
- follow speed:0.7 lead:10
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/FollowCommand.java#L24