Engine:Console commands: Difference between revisions

Line 35: Line 35:


Global commands:
Global commands:
: [[MACRO varedit|varedit]] - (none), / - Prints or sets variable, if variable exists and name is not another command.
: [[CCMD varedit|varedit]] - (none), / - Prints or sets variable, if variable exists and name is not another command.
: [[MACRO var|var]] - var, /var - Creates a variable. If already exists, then does not change value.
: [[CCMD var|var]] - var, /var - Creates a variable. If already exists, then does not change value.
: [[MACRO set|set]] - set, /set - Set an existing var. Updates a value on an existing variable if exists.
: [[CCMD set|set]] - set, /set - Set an existing var. Updates a value on an existing variable if exists.
: [[MACRO alias|alias]] - alias, /alias - New named script. Will change existing alias if already created.
: [[CCMD alias|alias]] - alias, /alias - New named script. Will change existing alias if already created.
: [[MACRO bind|bind]] - bind, /bind - Key to script.  Map a key to a script block.
: [[CCMD bind|bind]] - bind, /bind - Key to script.  Map a key to a script block.
: [[MACRO echo|echo]] - echo, /echo - Write text to log only. Print text to current console but not the file.
: [[CCMD echo|echo]] - echo, /echo - Write text to log only. Print text to current console but not the file.
: [[MACRO bind|print]] - print, /print - Write text to log and file. Print text to current console and to file.
: [[CCMD bind|print]] - print, /print - Write text to log and file. Print text to current console and to file.
: [[MACRO bind|context]] - context, /context - Change context. Change current console context to another known context.
: [[CCMD bind|context]] - context, /context - Change context. Change current console context to another known context.
: [[MACRO bind|run]] - run, /run - Load and run script file. Run a named script file. Name must include extension.
: [[CCMD bind|run]] - run, /run - Load and run script file. Run a named script file. Name must include extension.


Global vars:
Global vars:
Line 79: Line 79:


Lua context commands:
Lua context commands:
: [[MACRO lua.lua_edit|lua_edit]] - (none), / - Runs a Lua command in the main Lua runtime as though were in a Lua console
: [[CCMD lua.lua_edit|lua_edit]] - (none), / - Runs a Lua command in the main Lua runtime as though were in a Lua console
: [[MACRO lua.run|run]] - lua run - Runs a Lua command in the Lua runtime.
: [[CCMD lua.run|run]] - lua run - Runs a Lua command in the Lua runtime.
: [[MACRO lua.block|block]] - lua run - Runs a Lua command block in the Lua runtime
: [[CCMD lua.block|block]] - lua run - Runs a Lua command block in the Lua runtime
: [[MACRO lua.exit|exit]] - lua exit - Immediately switches current context to 'global'
: [[CCMD lua.exit|exit]] - lua exit - Immediately switches current context to 'global'


Lua context aliases:
Lua context aliases:
Line 120: Line 120:


Global commands:
Global commands:
: [[MACRO quit|quit]] - quit, /quit - Exits engine immediately with graceful shutdown.
: [[CCMD quit|quit]] - quit, /quit - Exits engine immediately with graceful shutdown.


Global vars:
Global vars:
Line 135: Line 135:


Global commands:
Global commands:
: [[MACRO console|console]] - console, /console - Opens command console
: [[CCMD console|console]] - console, /console - Opens command console


Global vars:
Global vars:
Line 191: Line 191:


Client context commands:
Client context commands:
: [[MACRO client.start|start]] - client start - Starts the 'client' module.
: [[CCMD client.start|start]] - client start - Starts the 'client' module.
: [[MACRO client.stop|stop]] - client stop - Stops the 'client' module.
: [[CCMD client.stop|stop]] - client stop - Stops the 'client' module.


Client context aliases:
Client context aliases:
: [[MACRO client.lol|lol]] - client lol - 'print "client lol"' - Demo alias. Prints "client lol".
: [[CCMD client.lol|lol]] - client lol - 'print "client lol"' - Demo alias. Prints "client lol".