49
edits
No edit summary |
(→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. < | ** 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> | ||
** Also prints 3 and return to global. Where context is switched to, then the Lua command is run. < | ** Also prints 3 and return to global. Where context is switched to, then the Lua command is run. <kua>context lua; print(1 + 3); exit</kua> | ||
** Starts the client module. < | ** Starts the client module. <kua>client start</kua> | ||
** Starts the client module and returns to global. < | ** Starts the client module and returns to global. <kua>context client; start; context global</kua> | ||
** Prints 'fred', using the 'global' default 'varedit' command. 'bob' is not a command but an existing variable. < | ** Prints 'fred', using the 'global' default 'varedit' command. 'bob' is not a command but an existing variable. <kua>var bob fred; bob</kua> | ||
** Prints 'james'. Where the default command finds the existing 'bob' variable in the 'global' context, and assigns 'james'. < | ** Prints 'james'. Where the default command finds the existing 'bob' variable in the 'global' context, and assigns 'james'. <kua>bob james; bob</kua> | ||
* 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. | ||