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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Lua Command Lua Commands

Lua Command objectat



  • x
  • y
  • [type] (optional)


Returns the ID of the first object which is found at the tile position (X|Y) and which has the specified type. The function will return the first object of any type at this position if no type is specified. The function returns 0 if nothing is found at the specified position / with the specified type.

Object types are:
CS2D Dynamic Objects

Note: The position (X|Y) is specified in TILES!