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 context is switched to:
* 'Default command' - is run by default if its context is addressed by name or is the context is switched to:
*: <pre>lua print(1 + 3)</pre> will print 3. Where 'lua' is a child context and 'print' is a real Lua command, not an Engine script one.
** Will print 3. Where 'lua' is a child context and 'print' is a real Lua command, not an Engine script one. <pre>lua print(1 + 3)</pre>  
*: <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.
** 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>
*: <pre>client start</pre> will start the client module.  
** Will start the client module. <pre lang="lua">client start</pre>  
*: <pre>context client; start; context global</pre> will start the client module and return to global.
** Will start the client module and return to global. <pre>context client; start; context global</pre>
* Command - a script command
* Command - a script command
* Variable - a script variable
* Variable - a script variable