Tileset

A set of tiles.

Tileset.name

local name = tileset.name
tileset.name = name

Gets or sets the name of this tileset.

Tileset.baseIndex

local baseindex = tileset.baseIndex
tileset.baseIndex = baseindex

Gets or sets the base index of this tileset.

Tileset.color

Tileset.data

local data = tileset.data
tileset.data = data

Gets or sets the user-defined data related to this tileset (a text string).

Tileset.properties

Access user-defined and extension-defined properties of this tileset.

Tileset.grid

local grid = tileset.grid

Returns the grid of this tileset.

Tileset:tile()

local tile = ts:tile(index)

Returns the tile in the given index (0 is the empty tile, so 1 is the first user-defined tile).

Tileset:getTile()

local tileImage = ts:getTile(index)

Returns the image of tile in the given index (0 is the empty tile, so 1 is the first user-defined tile).

Note: This method was superseded with Tileset:tile(), so you can use the following alternative:

local tileImage = ts:tile(index).image