Skip to content

Tile Map

Grid of tiles from a tileset image, painted in the viewport; optional colliders.

Type: TileMapNode · Category: Graphics & Rendering · Also found as: tilemap

Property Type Default Description
solid boolean false Build static colliders for the painted tiles.
tint color #ffffffff Multiplies the texture’s colours (white = unchanged; alpha fades it).
asepriteLayer string "" With an Aseprite file as the tileset: the tilemap layer the map comes from (its tiles, flips and tileset; kept in sync when the file is saved). Empty: paint the map here.

Plus the common properties every node has.

Call them on the node (self.node in its script, or self.node:get_node("path")). Every node also has the Node methods.

Reads an Inspector property by its path (vectors and colours as tables); “script.” reads a field of the node’s script.

local value = self.node:get_property("solid")
  • path TileMapNodeProperty|string

Returns any

Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.” a field of the node’s script.

self.node:set_property("solid", true)
  • path TileMapNodeProperty|string
  • value any
  • y? number
{
"type": "TileMapNode",
"name": "TileMap",
"position": [
0,
0
],
"properties": {
"solid": false,
"tint": "#ffffffff",
"asepriteLayer": ""
}
}