Tile

About

Terrain is created from tiles, total number of tiles in scenario = scenario.map.width * scenario.map.height.

Attributes

Methods

Examples

selecting a tile from scenario

tile = scenario.tiles.tile[2][1]  # select a tile from row 2 and collumn 1 

placing a Forest Tree on selected tile

# previous code
scenario.units.new(owner=0, type=411, x=tile.x, y=tile.y)

creating cross from leaves under Forest tree

# previous code
x = tile.x
y = tile.y
scenario.tiles[x][y].type = 5
scenario.tiles[x-1][y].type = 5
scenario.tiles[x+1][y].type = 5
scenario.tiles[x][y-1].type = 5
scenario.tiles[x][y+1].type = 5