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
hudtxtmoveCategories
Parameters
- player (1-32): id of a player (or 0 for all)
- id (0-199): internal text id
- duration (ms): alpha fade/transition effect in milliseconds
- x (0-850): new x position
- y (0-480): new y position
Info
Lets a HUD text (specified with id) change its position. The transition will be smooth and will take the given time (duration).
You can let this effect be visible for all players (player=0) or to a certain player only (player=id of this player).
Note: You can also use coordinates outside the screen range (0-850 and 0-480) to make text scroll out of the screen. The values above only define the visible screen area.
Note: Since CS2D 1.0.0.3 the screen size is dynamic / depends on mp_hudscale! Please read the mp_hudscale reference for details!
Lua Hooks
Lua Commands
Categories
Parameters
- player (1-32): id of a player (or 0 for all)
- id (0-199): internal text id
- duration (ms): alpha fade/transition effect in milliseconds
- x (0-850): new x position
- y (0-480): new y position
Info
Lets a HUD text (specified with id) change its position. The transition will be smooth and will take the given time (duration).
You can let this effect be visible for all players (player=0) or to a certain player only (player=id of this player).
You can let this effect be visible for all players (player=0) or to a certain player only (player=id of this player).
Note: You can also use coordinates outside the screen range (0-850 and 0-480) to make text scroll out of the screen. The values above only define the visible screen area.
Note: Since CS2D 1.0.0.3 the screen size is dynamic / depends on mp_hudscale! Please read the mp_hudscale reference for details!