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
Category: script (7)
aliasCategories
Parameters
- alias (text): name for your alias
- script (text): script you want to execute with this alias
Info
Create an alias. An alias can be used like a normal script command. It executes one or more other commands (it's like a shortcut).
For example:
alias "test" "echo test!; echo 123"
This creates the new alias/command "test" which prints the lines "test!" and "123" in your console.
Note: CS2D does NOT automatically save your aliases when you enter it in the console. All aliases will be removed as soon as you quit CS2D.
Note: If you want to keep your aliases put them in a file like sys/autoexec.cfg!
Lua Hooks
Lua Commands
Categories
Parameters
- alias (text): name for your alias
- script (text): script you want to execute with this alias
Info
Create an alias. An alias can be used like a normal script command. It executes one or more other commands (it's like a shortcut).
For example:
This creates the new alias/command "test" which prints the lines "test!" and "123" in your console.
For example:
alias "test" "echo test!; echo 123"
This creates the new alias/command "test" which prints the lines "test!" and "123" in your console.
Note: CS2D does NOT automatically save your aliases when you enter it in the console. All aliases will be removed as soon as you quit CS2D.
Note: If you want to keep your aliases put them in a file like sys/autoexec.cfg!