Category: Tilemap — Map shapes
Syntax:
tmNeighbourX:Int(map:Int, x:Int, y:Int, direction:Int)
The column.
Gets the column of the cell next to this one. Staggered and hexagonal maps have directions 0 to 5, going clockwise: from east if they're staggered by row, from north if by column. Square and isometric maps have 0 to 3: east, south, west, north. The answer can be outside the map, and a bad direction gives the same cell.
See the Tilemaps guide.
nx = tmNeighbourX(map, x, y, 1)
BambooBasic © 2026 Michael Denathorn