Engine:CCMD context: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{dev/uiccmd}} Switches contexts or prints the current context. <kua>context client</kua> == Arguments == * name (optional) - The name of the context to switch to. If no name, then prints the name of the current context. == Details == The 'context' command allows changing between named contexts. A context can be thought of as a discrete place where commands can be executed. Each context may have its own commands and variables and rules, and purpose. For a different co...") |
|||
Line 7: | Line 7: | ||
== Details == | == Details == | ||
The 'context' command allows changing between named contexts | The 'context' command allows changing between named contexts. Each context may have its own commands and variables and rules, and purpose. | ||
For a | For a context to be available, it has to be associated with the one you are in. These associations are created by the various engine modules and can never be directly added or removed by console commands or any type of script or AddOn. | ||
== Examples == | == Examples == |
Revision as of 06:51, 15 October 2023
Switches contexts or prints the current context.
context client
Arguments
- name (optional) - The name of the context to switch to. If no name, then prints the name of the current context.
Details
The 'context' command allows changing between named contexts. Each context may have its own commands and variables and rules, and purpose.
For a context to be available, it has to be associated with the one you are in. These associations are created by the various engine modules and can never be directly added or removed by console commands or any type of script or AddOn.
Examples
Default values
- Try to change to a non-existent context.
> context bob Unknown: bob
- Called with no name. The current context is printed.
> context global
- Same as the first example, but now bob exists.
> var bob
'bob' is 'fred'
- Try to set existing 'bob' to 'james', value changes.
> var bob james
> var bob
'bob' is 'james'