overworld map exists at
Problem it solves
You have an uneven map layout with blank areas and want to make sure a room exists at (col, row) before trying to load it.
What this block does
Returns true if a valid tilemap is assigned to the given column and row coordinates in the grid, and false otherwise.
The block
Block ID: overworld_mapExistsAt
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| column | number | — | The column coordinate to check. |
| row | number | — | The row coordinate to check. |
Returns
boolean — true if a tilemap exists at that coordinate; otherwise false.
Example
if (overworld.mapExistsAt(2, 1)) {
overworld.loadMap(2, 1)
}Add the extension
Add github:riknoll/arcade-overworld to your project, or open: Import arcade-overworld.