Skip to content

tileslayer: members

12 implemented, 0 reserved. Entries are sorted by name.

tileslayer.alpha: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

The opacity of the layer from 0 to 1.

level.tilelayers[0].alpha = 0.5;

Specification: world-and-objects.md§20.7.

tileslayer.blue: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

How much of the blue of the tiles shows, from 0 to 1.

level.tilelayers[0].blue = 0.5;

Specification: world-and-objects.md§20.7.

tileslayer.green: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

How much of the green of the tiles shows, from 0 to 1.

level.tilelayers[0].green = 0.5;

Specification: world-and-objects.md§20.7.

tileslayer.layerindex: number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no. read-only.

The number of the layer, 0 for the bottom one.

echo(level.tilelayers[0].layerindex);

Specification: world-and-objects.md§20.7.

tileslayer.offset: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

The three shifts as the text “x,y,z”.

level.tilelayers[0].offset = "8,0,0";

Specification: world-and-objects.md§20.7.

tileslayer.red: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

How much of the red of the tiles shows, from 0 to 1.

level.tilelayers[0].red = 0.5;

Specification: world-and-objects.md§20.7.

tileslayer.tiles: object

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no. read-only.

The tiles of the layer: tiles[x, y] reads or writes the tile number at a cell; 4095 is no tile on a higher layer.

level.tilelayers[1].tiles[10, 20] = 4095;

Specification: world-and-objects.md§20.7.

tileslayer.updateboard(x: number, y: number, width: number, height: number)

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Asks for an area of this layer to be drawn again; see updateboard.

level.tilelayers[1].updateboard(0, 0, 64, 64);

Specification: world-and-objects.md§20.7.

tileslayer.updateboard2(x: number, y: number, width: number, height: number)

Runs on: server only. Origin: compatibility. Since: M12. Playground: no.

Sends the changed board to the players of the level. Tiles are changed with layer.tiles[x, y] = tile.

tilelayers[0].updateboard2(5, 5, 1, 1);

Specification: standard-library.md§17.6.

tileslayer.x: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

How far the layer is shifted along x, in pixels.

level.tilelayers[0].x = 8;

Specification: world-and-objects.md§20.7.

tileslayer.y: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

How far the layer is shifted along y, in pixels.

level.tilelayers[0].y = 8;

Specification: world-and-objects.md§20.7.

tileslayer.z: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

The height of the layer; kept for scripts and not drawn.

level.tilelayers[0].z = 1;

Specification: world-and-objects.md§20.7.

Engine version 0.1.0. Built 2026-11-18.