tmBoxHit

Category: Tilemap — Queries

Syntax:

tmBoxHit:Int(map:Int, layer:Int, x:Int, y:Int, w:Int, h:Int, flags:Int)


Parameters

Returns

1 if it hits, otherwise 0.



Summary

Asks if a box in the world touches a tile with these flags, respecting tile shapes and flips. On an isometric map the box is in grid pixels, and on staggered and hexagonal maps this returns 0. tmHitX, tmHitY, tmHitTile, tmHitWorldX and tmHitWorldY give the details.

See the Tilemaps guide.



Example
If tmBoxHit(map, ground, px, py + 1, 16, 16, 1) Then onGround = True

BambooBasic © 2026 Michael Denathorn