49
edits
(→Key) |
|||
| Line 11: | Line 11: | ||
* 'Global commands' and 'Global variables' - below are short-hand for commands placed in the 'global' context. | * 'Global commands' and 'Global variables' - below are short-hand for commands placed in the 'global' context. | ||
* 'Default command' - is run by default if its context is addressed by name or is the current context. Examples: | * 'Default command' - is run by default if its context is addressed by name or is the current context. Examples: | ||
** Prints 3. Where the 'lua' context is addressable from 'global', and 'print' is a real Lua command, not an Engine script one. <kua>lua print(1 + 3)</kua> | ** <kua>bob james; bob</kua> Prints 'james'. The global default command 'varedit' finds the existing 'bob' variable in the 'global' context, and assigns 'james'. | ||
** <kua>lua print(1 + 3)</kua> Prints 3. Where the 'lua' context is addressable from 'global', and 'print' is a real Lua command, not an Engine script one. | |||
** <kua>context lua; print(1 + 3); exit</kua> Also prints 3 and return to global. Where context is switched to, then the Lua command is run. | |||
** <kua>client start</kua> Starts the client module. | |||
** <kua>context client; start; context global</kua> Starts the client module and returns to global. | |||
** <kua>var bob fred; bob</kua> Prints 'fred', using the 'global' default 'varedit' command. 'bob' is not a command but an existing variable. | |||
* Command - An engine module command. | * Command - An engine module command. | ||
* Variable - An engine variable, similar to 'CVars' or config vars. | * Variable - An engine variable, similar to 'CVars' or config vars. | ||