set path
Problem it solves
You want to update an existing patrol route with a new set of destinations without needing to create a brand new path variable.
What this block does
Replaces the list of tile locations in an existing path object and recalculates the routes between them.
The block
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| tmpath | TilemapPath | path | The path object you want to update. |
| path | tiles.Location[] | null | The new list of tile locations to visit in order. |
Example
let myPath = TilemapPath.create_path([tiles.getTileLocation(1, 1)]) TilemapPath.set_path(myPath, [tiles.getTileLocation(3, 3), tiles.getTileLocation(6, 6)])
Add the extension
Add github:UnsignedArduino/TilemapPath to your project, or open: Import TilemapPath.