tmProbe

Category: Tilemap — Following ground

Syntax:

tmProbe:Int(map:Int, layer:Int, x:Double, y:Double, dirX:Double, dirY:Double, from:Int, reach:Int, flags:Int)


Parameters

Returns

1 if it finds one, otherwise 0.



Summary

Walks along a direction a pixel at a time for the first solid pixel. On an isometric map it works in grid pixels, and on staggered and hexagonal maps it returns 0. tmHitDistance gives how far it was from the point.

See the Tilemaps guide.



Example
If tmProbe(map, ground, x, y, 1.0, 0.0, 1, 12, 1) Then x = x - (12 - tmHitDistance())

BambooBasic © 2026 Michael Denathorn