- CS2D Console Commands are entered in the console, executed with key-binds, configuration (cfg) files or in Lua with parse
- Lua Hooks are used to execute Lua scripts when events occur in CS2D - 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
Category: player (50)
- id: player id
- type: building type
- x: building x (tiles)
- y: building y (tiles)
- mode: building mode
When a player tries to build something. This hook is triggered as soon as the player selected the building type and a location.
Note: This hook is triggered BEFORE doing all the sanity checks. So it will also be triggered if the player does not have enough money, chose an invalid location or can't build the chosen building for any other reason.
Note: The build hook will be triggered afterwards. It will only be triggered if building the building was actually possible.
- 0: proceed normally
- 1: don't build