tilemap_set_cell
Assign a tile to a specific position in a TileMap or TileMapLayer node using coordinates, source ID, and atlas indices.
Instructions
Set a cell in a TileMap or TileMapLayer node.
Category: TileMap
Args: project_path: Path to the Godot project directory scene_path: Path to the scene file (relative to project) node_path: Path to the TileMap or TileMapLayer node (e.g., "root/TileMap") x: X coordinate of the cell y: Y coordinate of the cell source_id: ID of the tile source/tileset (default: 0) atlas_x: X coordinate in the tile atlas (default: 0) atlas_y: Y coordinate in the tile atlas (default: 0) layer: Layer index for TileMap nodes (ignored for TileMapLayer, default: 0) alternative_tile: Alternative tile ID (default: 0)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| scene_path | Yes | ||
| node_path | Yes | ||
| x | Yes | ||
| y | Yes | ||
| source_id | No | ||
| atlas_x | No | ||
| atlas_y | No | ||
| layer | No | ||
| alternative_tile | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |