tmNeighbourX

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. Takes map (The map's handle), x (The tile column, from 0), y (The tile row, from 0), direction (Which way, as above). Returns: The column.

Tilemap

Parameters & Returns

Parameters

map Int
x Int
y Int
direction Int

Returns

Int

Quick Summary

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. Takes map (The map's handle), x (The tile column, from 0), y (The tile row, from 0), direction (Which way, as above). Returns: The column.

Technical Exegesis...

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.

Returns: The column.

Example

Example.bam
nx = tmNeighbourX(map, x, y, 1)