Commands/Lua

Reference for console commands, Lua hooks and Lua commands in CS2D.

CS2D Command CS2D Console Commands

CS2D Command settile

Categories

Parameters

  • x (0-X): map x position (in tiles)
  • y (0-X): map y position (in tiles)
  • tile (0-255): tile frame index

Info

Changes the specified tile on the map to the given tile frame. This affects the tile look and the tile behavior. Works as server only. All other players will see the changes. Players who join afterwards will see the changes on their map too.

Tiles will never be changed back automatically unless another or the same map is reloaded.

Note that behaviors of tiles are only saved up to the highest tile frame which is actually used on the map. Tiles with higher tile frames which are not used on the map but set with this command will always have the default behavior (soundless floor).

Also note that this command does not perform any advanced checks. You can set walls on players/NPCs/entities/items with this command. This may lead to bugs under certain circumstances. It is up to you to perform proper checks to avoid such problems.

You can use the Lua command "tile" with the parameters "hascustomframe" or "originalframe" to check if this command has been used with a certain tile.

Changes made with settile do not affect the minimap.

Lua Hook Lua Hooks

Lua Command Lua Commands