tmSetTileAuto

Category: Tilemap — Autotile

Syntax:

tmSetTileAuto:Void(map:Int, layer:Int, x:Int, y:Int, terrain:Int)


Parameters

Returns

Nothing.



Summary

Sets a cell to a terrain, or empties it, then picks the right tile for it and its 8 neighbours. Neighbours that aren't this terrain are left alone, and the edge of the map counts as the same terrain.

See the Tilemaps guide.



Example
tmSetTileAuto(map, ground, x, y, 1)

BambooBasic © 2026 Michael Denathorn