tmSetTileMask

Category: Tilemap

Syntax:

tmSetTileMask:Void(tileset:Int, id:Int, mask:String)


Parameters

Returns

Void



Summary

Gives a tile a pixel shape, for slopes and curves. Without one, the whole tile is solid. Collision commands use it, and it turns and flips with the tile. Use tmMasksFromImage instead if the art already has the shape.

Takes tileset (The tileset's handle), id (The tile id. 0 is empty, and ids from 1 are the tiles in the tileset), mask (Hex digits, top row first, the left pixel in the high bit of each digit. Each row has enough digits for the width, so a 16x16 tile takes 64 digits).

Returns nothing.

View detailed documentation online



Example
tmSetTileMask(shapes, 1, slopeText)

BambooBasic © 2026 Michael Denathorn