Wiki 9Minecraft Wiki 9Minecraft
Sk Ray Fall Plugin Wiki › Guides › Create a Custom NPC with Pathfinding

Create a Custom NPC with Pathfinding

Setting Up Your NPC

Sk Ray Fall Plugin integrates with Citizens to give you precise control over NPC movement and navigation. Start by creating an NPC using Citizens commands, then use Sk Ray Fall's pathfinding tools in your Skript to make them walk intelligently through your world.

Building the Script

In your Skript file, reference the NPC by its ID and set waypoints or destinations. The plugin handles complex pathfinding automatically—your NPC will navigate around obstacles and terrain changes without you manually coding each step.

You can:

  • Define specific patrol routes by setting multiple waypoints
  • Make NPCs avoid water, lava, or dangerous blocks
  • Trigger movement based on player proximity or custom events
  • Control walking speed and animation states

Example Approach

Create a command that spawns an NPC and sends it to follow a path you've defined. Use Sk Ray Fall's NPC control syntax to update the NPC's target location, and the pathfinding system will calculate the safest route automatically. Test by walking near your NPC to see it navigate naturally around your builds.