tmTileAt

Gets the tile at a world position, on any shape of map. Takes map (The map's handle), layer (The layer's number, from tmAddLayer or tmGetLayer), worldX (The world x position, in pixels), worldY (The world y position, in pixels). Returns: The tile id, or 0 if empty or outside the map.

Tilemap

Parameters & Returns

Parameters

map Int
layer Int
worldX Int
worldY Int

Returns

Int

Quick Summary

Gets the tile at a world position, on any shape of map. Takes map (The map's handle), layer (The layer's number, from tmAddLayer or tmGetLayer), worldX (The world x position, in pixels), worldY (The world y position, in pixels). Returns: The tile id, or 0 if empty or outside the map.

Technical Exegesis...

Gets the tile at a world position, on any shape of map.

See the Tilemaps guide.

Returns: The tile id, or 0 if empty or outside the map.

Example

Example.bam
id = tmTileAt(map, ground, px, py)