MakeCode Games!

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

← Back to extensions

Arcade Overworld

Create connected Zelda-style room grids and seamless multi-screen adventure worlds with smooth transitions and auto-scrolling.

on map loaded

Problem it solves

You want to spawn monsters, place treasure chests, and clear old enemies every time the player enters a new room.

What this block does

Runs an event handler whenever a new tilemap is loaded, providing the new grid column, row, and tilemap data.

The block

Block ID: overworld_onMapLoaded

on map loaded at $overworldColumn $overworldRow $map block

Parameters

NameTypeDefaultMeaning
handler(overworldColumn: number, overworldRow: number, map: tiles.TileMapData) => void—The callback function to run with overworldColumn, overworldRow, and map parameters.

Example

overworld.onMapLoaded(function (col, row, map) {
    sprites.destroyAllSpritesOfKind(SpriteKind.Enemy)
    let enemy = sprites.create(img`.`, SpriteKind.Enemy)
    tiles.placeOnRandomTile(enemy, sprites.dungeon.floorLight0)
})

Add the extension

Add github:riknoll/arcade-overworld to your project, or open: Import arcade-overworld.