tmAddLayer

Category: Tilemap

Syntax:

tmAddLayer:Int(map:Int, name:String, tileset:Int)


Parameters

Returns

Int



Summary

Adds an empty layer on top of the others, drawn with this tileset.

Takes map (The map's handle), name (The layer's name, for tmGetLayer), tileset (The tileset's handle).

Returns: The layer's number, or -1 for a bad map.

View detailed documentation online



Example
ground = tmAddLayer(map, "ground", tiles)

BambooBasic © 2026 Michael Denathorn