tilemap
10 public commands in this category.
add_tilemap_layer
Append a new layer to the tilemap
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Tilemap entity ID
- name string (required)
- Layer name
- visible boolean (optional)
- Layer visibility (default: true)
clear_tiles
Erase tiles from one tilemap layer; omit the bounds to clear the whole layer
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Tilemap entity ID
- layerIndex integer (required)
- Layer index
- fromX integer (optional)
- First tile column (inclusive, default: 0)
- fromY integer (optional)
- First tile row (inclusive, default: 0)
- toX integer (optional)
- Last tile column (inclusive, default: last column)
- toY integer (optional)
- Last tile row (inclusive, default: last row)
create_tilemap
Create a new tilemap entity backed by an imported tileset
Scope:
scene:write. Token cost: 0.- tilesetAssetId string (required)
- Asset ID of a tileset previously registered with import_tileset
- mapSize array (optional)
- Tilemap dimensions in tiles [width, height] (default: [20, 15])
- name string (optional)
- Display name for the tilemap (default: "Tilemap")
- origin string (optional)
- Grid origin (default: TopLeft)
- tileSize array (optional)
- Size of each tile in pixels [width, height] (default: [32, 32])
fill_tiles
Fill an inclusive rectangular range of one tilemap layer with a single tile
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Tilemap entity ID
- fromX integer (required)
- First tile column (inclusive)
- fromY integer (required)
- First tile row (inclusive)
- layerIndex integer (required)
- Layer index
- tileIndex integernull (required)
- Tile index from the tileset, or null to erase the range
- toX integer (required)
- Last tile column (inclusive)
- toY integer (required)
- Last tile row (inclusive)
get_tilemap
Query tilemap data for an entity
Scope:
scene:read. Token cost: 0.- entityId string (required)
- Tilemap entity ID
remove_tilemap_layer
Remove a layer from the tilemap; the last remaining layer cannot be removed
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Tilemap entity ID
- layerIndex integer (required)
- Layer index to remove
resize_tilemap
Resize the tilemap grid, anchored at the top-left; trimmed cells are discarded
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Tilemap entity ID
- height integer (required)
- New height in tiles
- width integer (required)
- New width in tiles
set_tile
Set a single tile on one tilemap layer
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Tilemap entity ID
- layerIndex integer (required)
- Layer index
- tileIndex integernull (required)
- Tile index from the tileset, or null to erase the cell
- x integer (required)
- Tile X coordinate
- y integer (required)
- Tile Y coordinate
set_tile_collision_shape
Author stored collision-shape metadata for one tilemap cell. These shapes do not affect play physics yet.
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Scene entity ID carrying the existing tilemap
- layerIndex integer (required)
- Zero-based index of an existing tilemap layer
- shape string (required)
- Stored silhouette for the cell: none (unauthored), full, halfTop, halfBottom, slopeLeft or slopeRight. Runtime colliders are not implemented.
- x integer (required)
- Zero-based column of an existing cell within the tilemap
- y integer (required)
- Zero-based row of an existing cell within the tilemap
set_tilemap_layer
Configure layer properties (name, visibility, opacity)
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Tilemap entity ID
- layerIndex integer (required)
- Layer index
- name string (optional)
- New layer name
- opacity number (optional)
- Layer opacity (0.0-1.0)
- visible boolean (optional)
- Layer visibility