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.

is sprite following path

Problem it solves

You want to check if an enemy is actively moving on a patrol before giving them a new command or changing their animation state.

What this block does

Checks whether a sprite is currently in the middle of navigating along a tilemap path.

The block

is $sprite following path block

Parameters

NameTypeDefaultMeaning
spriteSpritemySpriteThe sprite to check.

Returns

boolean — true if the sprite is actively following a path, false otherwise.

Example

let guard = sprites.create(img`.`, SpriteKind.Enemy)
if (TilemapPath.is_sprite_following_path(guard)) {
    guard.sayText("On patrol!")
}

Add the extension

Add github:UnsignedArduino/TilemapPath to your project, or open: Import TilemapPath.