Category: Tilemap
Syntax:
tmWorldToTileX:Int(map:Int, worldX:Int)
Int
Turns an x position into a tile column on a square map. On an isometric map it takes a grid x. For a world position on those maps, use tmTileXAt.
Takes map (The map's handle), worldX (The world x position, in pixels).
Returns: The column. It can be outside the map.
View detailed documentation online
cx = tmWorldToTileX(map, camX + inpGetMouseX())
BambooBasic © 2026 Michael Denathorn