Incrementvar: Difference between revisions
Jump to navigation
Jump to search
Note:Incrementing a variable past the MAXVALUE specified causes the variable to loop around to the MINVALUE. The same happens the other way around, too.
m (Remove Category:Core Console Commands) |
(added console command template) |
||
Line 1: | Line 1: | ||
{{Console Command}} | |||
<code>'''incrementvar'''</code> is a [[console command]] which can increment a given console variable. In tandem with {{ent|setinfo}}, it can be used to count things arbitrarily. | <code>'''incrementvar'''</code> is a [[console command]] which can increment a given console variable. In tandem with {{ent|setinfo}}, it can be used to count things arbitrarily. | ||
Line 13: | Line 14: | ||
*{{ent|BindToggle}}, a console command that works off this one. | *{{ent|BindToggle}}, a console command that works off this one. | ||
*{{ent|multvar}}, multiply var. | *{{ent|multvar}}, multiply var. | ||
Revision as of 15:09, 26 June 2023
Template:Console Command
incrementvar
is a console command which can increment a given console variable. In tandem with setinfo, it can be used to count things arbitrarily.
Syntax
incrementvar CVAR MINVALUE MAXVALUE DELTA
- CVAR: a console variable we want to change.
- MINVALUE: a minimum bound for our variable.
- MAXVALUE: a maximum bound for our variable.
- DELTA: the amount to increase CVAR by. Set this to a negative number to decrement.

See also
- BindToggle, a console command that works off this one.
- multvar, multiply var.