Engine:Console commands: Difference between revisions

Line 12: Line 12:
* '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 lang="lua">lua print(1 + 3)</pre>  
** Prints 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 lang="lua">context lua; print(1 + 3); exit</pre>
** Also prints 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>  
** Starts the client module. <pre lang="lua">client start</pre>  
** Will start the client module and return to global. <pre lang="lua">context client; start; context global</pre>
** Starts the client module and returns 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>  
** Prints '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' variable in the 'global' context, and assigns 'james'. <pre lang="lua">bob james; bob</pre>
** Prints '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 - An engine module command.
* Variable - here refers to an engine variable, similar to 'CVars' or config vars.
* Variable - 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.
* Associations - Module or context associations and features.
* Associations - Module or context associations and features.
* Service - here refers to an engine messaging service. Which may be internal, local, or network for send or receive.
* Service - An engine messaging service. Which may be internal, local, or network for send or receive.
* Script - May refer to the base Engine script language, which can contain elements here. Or to strings of commands for an alias, or integrated higher-level scripting like blended in-line engine script with lua, JS, or C#.
* Script - May refer to the base Engine script language, which can contain elements here. Or to strings of commands for an alias, or integrated higher-level scripting like blended in-line engine script with lua, JS, or C#.
* Context - A script or command context. Each context may have its own commands and variables and rules.
* Context - A script or command context. Each context may have its own commands and variables and rules.