Tile Map
Grid of tiles from a tileset image, painted in the viewport; optional colliders.
Type: TileMapNode · Category: Graphics & Rendering · Also found as: tilemap
Properties
Section titled “Properties”| 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.
Lua methods
Section titled “Lua methods”Call them on the node (self.node in its script, or self.node:get_node("path")). Every node also has the Node methods.
TileMapNode:get_property(path)
Section titled “TileMapNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("solid")pathTileMapNodeProperty|string
Returns any
TileMapNode:set_property(path, value, y)
Section titled “TileMapNode:set_property(path, value, y)”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.
self.node:set_property("solid", true)pathTileMapNodeProperty|stringvalueanyy?number
In a scene file
Section titled “In a scene file”{ "type": "TileMapNode", "name": "TileMap", "position": [ 0, 0 ], "properties": { "solid": false, "tint": "#ffffffff", "asepriteLayer": "" }}