on sprite finishes tilemap path
Problem it solves
You want something to happen when a character reaches the end of their route, such as opening a door, triggering dialogue, or reversing a patrol.
What this block does
Registers an event handler that runs automatically whenever any sprite finishes traveling to the final point of its path.
The block
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| handler | (sprite: Sprite) => void | null | The code to run when a sprite finishes its path, with the arriving sprite provided as an argument. |
Example
TilemapPath.on_sprite_finishes_path(function (sprite) {
sprite.sayText("Destination reached!")
})Add the extension
Add github:UnsignedArduino/TilemapPath to your project, or open: Import TilemapPath.