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...
NameWalk
Syntaxwalk (<entity>|...) [<location>/stop] (speed:<#.#>) (auto_range) (radius:<#.#>) (lookat:<location>)
Short DescriptionCauses an entity or list of entities to walk to another location.
Full DescriptionCauses an entity or list of entities to walk to another location.

Specify a destination location to walk to, or 'stop' to stop all walking.

Optionally, specify a "speed:<#.#>" argument to control the speed of the NPCs.

Optionally, specify "auto_range" to automatically set the path range for the walk instruction
(if not specified, an NPC will not be able to walk to a location outside of its existing path range, by default 25 blocks).
(Does not apply to non-NPC entities).

Note that in most cases, the walk command should not be used for paths longer than 100 blocks.
For ideal performance, keep it below 25.

Optionally, specify a list of entities to give them all the same walk instruction at the same time.
If the list is of NPCs, optionally specify a "radius:<#.#>" argument to change the flocking radius.
('Radius' does not apply to non-NPC entities).

Optionally, specify "lookat:<location>" to cause the NPCs to stare at a specific location while walking (as opposed to straight ahead).
('Radius' does not apply to non-NPC entities).

The walk command is ~waitable. Refer to Language:~waitable.
Related Tags<NPCTag.is_navigating> Returns whether the NPC is currently navigating.
<NPCTag.speed> Returns the current speed of the NPC.
<NPCTag.range> Returns the NPC's current maximum pathfinding range.
<NPCTag.target_location> Returns the location the NPC is currently navigating towards (if any).
Usage Example
# Use to make the NPC walk to an anchored position.
- walk <npc> <npc.anchor[spot1]>
Usage Example
# Use to make the NPC walk to an anchored position that may be far away.
- walk <npc> <npc.anchor[spot2]> auto_range
Usage Example
# Use to make the NPC walk to an anchored position while looking backwards.
- walk <npc> <npc.anchor[spot3]> lookat:<npc.anchor[spot2]>
Usage Example
# Use to make the NPC walk to an anchored position, and then say something after arrival, using ~waitable syntax.
- ~walk <npc> <npc.anchor[spot4]>
- chat "I'm here!"
Usage Example
# Use to make a list of NPCs stored in a flag all move together, with a flocking radius based on the number of NPCs included.
- walk <player.flag[squad]> radius:<player.flag[squad].size> <player.location>
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/WalkCommand.java#L35