MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Tilemap Path

Create multi-point waypoint paths on tilemaps for sprites to follow with built-in obstacle avoidance.

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

on sprite $sprite finishes tilemap path block

Parameters

NameTypeDefaultMeaning
handler(sprite: Sprite) => voidnullThe 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.