LuaTile

class LuaTile - sort
collides_with(layer) What type of things can collide with this tile?
name :: string [R] Prototype name of this tile.
prototype :: LuaTilePrototype [R]
position :: Position [R] The position this tile references.
hidden_tile :: string (optional) [R]
valid :: boolean [R] Is this object valid?
help() → string All methods, and properties that this object supports.

A single "square" on the map.

collides_with(layer)

What type of things can collide with this tile?

Parameters
layer :: string: Possible values:
  • "ground-tile"
  • "water-tile"
  • "resource-layer"
  • "floor-layer"
  • "object-layer"
  • "player-layer"
  • "train-layer"
  • "layer-11"
  • "layer-12"
  • "layer-13"
  • "layer-14"
  • "layer-15"
Example
Check if the player would collide with a tile
game.player.print(tostring(game.player.surface.get_tile(1, 1).collides_with("player-layer")))
name :: string [Read-only]

Prototype name of this tile. E.g. "sand-dark" or "grass-dry".

prototype :: LuaTilePrototype [Read-only]

position :: Position [Read-only]

The position this tile references.

hidden_tile :: string (optional) [Read-only]