Engine:CCMD context
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. 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 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'