tmSetTerrain

Category: Tilemap

Syntax:

tmSetTerrain:Void(tileset:Int, terrain:Int, baseTile:Int, layout:Int)


Parameters

Returns

Void



Summary

Makes a block of tiles in the tileset into a terrain, for tmSetTileAuto. The order the tiles have to be in is in the guide.

Takes tileset (The tileset's handle), terrain (The terrain number, from 1), baseTile (The tile id of the first tile in the block), layout (16 for a block that only looks at the four sides, or 47 for one with inside corners too. Anything else is ignored).

Returns nothing.

View detailed documentation online



Example
tmSetTerrain(tiles, 1, 1, 47)

BambooBasic © 2026 Michael Denathorn