Commands/Lua
Reference for console commands, Lua hooks and Lua commands in CS2D.
- Console Commands are entered in console, executed with key-binds, cfg-files or with Lua parse
- Lua Hooks execute Lua when events occur - some have a return value which can change the game behavior
- Lua Commands are used to retrieve game data or to perform actions in Lua scripts
CS2D Console Commands
Lua Hooks
Lua Commands
Category: object (4)
objectatCategories
Parameters
- x
- y
- [type] (optional)
Info
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:
Note: The position (X|Y) is specified in TILES!
Categories
Parameters
- x
- y
- [type] (optional)
Info
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:
Object types are:
Note: The position (X|Y) is specified in TILES!