overworld map exists in direction
Problem it solves
You want to show a warning on the screen when the player is walking toward the edge of the world where no more rooms exist.
What this block does
Returns true if an adjacent tilemap exists in the given direction from the current room, or false if the player has reached the outer boundary.
The block
Block ID: overworld_mapExistsInDirection
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| direction | CollisionDirection | — | The direction to check (Top, Right, Bottom, or Left). |
Returns
boolean — true if a map exists in that direction; otherwise false.
Example
if (!overworld.mapExistsInDirection(CollisionDirection.Right)) {
game.splash("End of the world!")
}Add the extension
Add github:riknoll/arcade-overworld to your project, or open: Import arcade-overworld.