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
sv_daylighttimeCategories
Parameters
- timeangle (-1-360): the day light time angle (-1 for map default)
Info
Changes the angle and the brightness of the day light time. Can be used to switch between day and night etc.
Use -1 to keep the default value which is defined by the map. Each maps has the day light angle 220 unless something different is specified in the map properties (map editor).
Value ranges and meaning:
- -1: use the value defined by the map
- 0 - 180: night, pitch-black
- 180 - 210: dawn, getting brighter, shadow directing east to south-east
- 210 - 330: day, full brightness, shadow directing south-east to south-west
- 330 - 360: dusk, getting darker, shadow directing south-west to west
Lua Hooks
Lua Commands
Categories
Parameters
- timeangle (-1-360): the day light time angle (-1 for map default)
Info
Changes the angle and the brightness of the day light time. Can be used to switch between day and night etc.
Use -1 to keep the default value which is defined by the map. Each maps has the day light angle 220 unless something different is specified in the map properties (map editor).
Value ranges and meaning:
Use -1 to keep the default value which is defined by the map. Each maps has the day light angle 220 unless something different is specified in the map properties (map editor).
Value ranges and meaning:
- -1: use the value defined by the map
- 0 - 180: night, pitch-black
- 180 - 210: dawn, getting brighter, shadow directing east to south-east
- 210 - 330: day, full brightness, shadow directing south-east to south-west
- 330 - 360: dusk, getting darker, shadow directing south-west to west