LuaTile

class LuaTile
collides_with(layer) What type of things can collide with this tile?
name :: string [R] Prototype name of this tile.

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"
Example
Check if the player would collide with a tile
game.local_player.print(tostring(game.local_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".