This article's documentation is for anything that uses the Source engine. Click here for more information.

incrementvar

From Valve Developer Community
Revision as of 17:55, 7 January 2024 by PeeBot (talk | contribs) (Replacing {{console command}}. This operation was performed by a bot.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

incrementvar is a console command available in all Source Source games. 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.
Note.pngNote:Incrementing a variable past the MAXVALUE specified causes the variable to loop around to the MINVALUE. The same happens the other way around, too.

See also