create path
Problem it solves
You want an enemy guard, delivery drone, or NPC to walk through a specific sequence of checkpoints across your tilemap level.
What this block does
Creates a new path object from a list of tile locations. It automatically calculates the best route between each checkpoint using pathfinding so sprites avoid walls.
The block
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| path | tiles.Location[] | null | The list of tile locations to visit in order. |
Returns
TilemapPath — A new TilemapPath object containing the planned route.
Example
let loc1 = tiles.getTileLocation(2, 2) let loc2 = tiles.getTileLocation(8, 2) let myPath = TilemapPath.create_path([loc1, loc2])
Add the extension
Add github:UnsignedArduino/TilemapPath to your project, or open: Import TilemapPath.