49
edits
No edit summary |
(→Key) |
||
| Line 19: | Line 19: | ||
* '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: | ||
** Will print 3. Where the 'lua' context is addressable from 'global', and 'print' is a real Lua command, not an Engine script one. <pre>lua print(1 + 3)</pre> | ** Will print 3. Where the 'lua' context is addressable from 'global', and 'print' is a real Lua command, not an Engine script one. <pre lang="lua">lua print(1 + 3)</pre> | ||
** Will also print 3 and return to global. Where context is switched to, then the Lua command is run. <pre>context lua; print(1 + 3); exit</pre> | ** Will also print 3 and return to global. Where context is switched to, then the Lua command is run. <pre lang="lua">context lua; print(1 + 3); exit</pre> | ||
** Will start the client module. <pre lang="lua">client start</pre> | ** Will start the client module. <pre lang="lua">client start</pre> | ||
** Will start the client module and return to global. <pre>context client; start; context global</pre> | ** Will start the client module and return to global. <pre lang="lua">context client; start; context global</pre> | ||
** Will print 'fred', using the 'global' default 'varedit' command. 'bob' is not a command but an existing variable. <pre lang="lua">var bob fred; bob</pre> | ** Will print 'fred', using the 'global' default 'varedit' command. 'bob' is not a command but an existing variable. <pre lang="lua">var bob fred; bob</pre> | ||
** Will print 'james'. Where the default command finds the existing 'bob' | ** Will print 'james'. Where the default command finds the existing 'bob' variable in the 'global' context, and assigns 'james'. <pre lang="lua">bob james; bob</pre> | ||
* Command - here refers to an engine module command. | * Command - here refers to an engine module command. | ||
* Variable - here refers to an engine variable, similar to ' | * Variable - here refers to an engine variable, similar to 'CVars' or config vars. | ||
* Alias - an alias or macro which is a string of script. | * Alias - an alias or macro which is a string of script. | ||
* Binding - key bindings to the keyboard or mouse buttons, or from other real or virtual devices. | * Binding - key bindings to the keyboard or mouse buttons, or from other real or virtual devices. | ||