Toggle: Difference between revisions
Jump to navigation
Jump to search
m (Remove Category:Core Console Commands) |
m (added console command template) |
||
Line 1: | Line 1: | ||
{{ | {{Console Command}} | ||
'''Toggle''' a <code>cvar</code> on and off, or cycle it between a set of values. | |||
==Syntax== | ==Syntax== | ||
Line 16: | Line 17: | ||
*{{ent|BindToggle}} | *{{ent|BindToggle}} | ||
*{{ent|setinfo}}, create an arbitrary console variable. | *{{ent|setinfo}}, create an arbitrary console variable. | ||
Revision as of 17:34, 26 June 2023
Template:Console Command
Toggle a cvar
on and off, or cycle it between a set of values.
Syntax
toggle CVAR VALUE1 VALUE2 VALUE3 ... VALUEN
"Toggling" past the last argument will loop around, i.e. cvar
is set VALUE1
once again. Repeating the last value will prevent looping.
Examples
If values are omitted cvar
is toggled between 0 and 1
toggle cl_showpos
Step 0 to 4
toggle cl_showfps 0 1 2 3 4
Step 0 to 4 and stop at 4
toggle cl_showfps 0 1 2 3 4 4
Cycle values
toggle viewmodel_fov 54 57 59 65 71 98
See also
- BindToggle
- setinfo, create an arbitrary console variable.