kts.RemoveTile

Name

kts.RemoveTile – remove a tile from the dungeon

Synopsis

kts.RemoveTile(pos, tile)

Description

Given a Position (table containing x and y co-ordinates) and a Tile, this function will look for a copy of the given tile in the given dungeon square, and if found, remove/delete it.

If multiple copies of the tile exist in the given square, only one is removed.

Return Value

No value is returned.

Errors

An error occurs if the input arguments are not a valid map position or Tile respectively.

If no copy of the tile exists at the given square, this is not an error – the function just does nothing in that case.

Examples

One example of using this function is to implement "toggling" between, say, an open pit tile and a closed pit tile. kts.RemoveTile would be used to remove the open pit and kts.AddTile would be used to replace it with a closed pit (or vice versa).

See Also

kts.AddTile

kts.GetTiles

kts.Tile