Incrementvar: Difference between revisions
Jump to navigation
Jump to search
Rodeoclown (talk | contribs) mNo edit summary |
m (clean) |
||
Line 1: | Line 1: | ||
A [[console command]] which can increment a given console variable. | A [[console command]] which can increment a given console variable. | ||
It increments the given ''varname'' by the ''delta'', whilst keeping the value within the bounds specified by ''minValue'' and ''maxValue'' | |||
==Usage== | ==Usage== | ||
{{syntax|incrementvar <varname> <minValue> <maxValue> <delta>}} | |||
There is a bug (or at least a | There is a bug (or at least a weird way of doing things), where incrementing a variable past the maxValue specified can set it to 0. The example linked below avoids this problem by first decrementing, then incrementing the specified variable. | ||
See [[ | See [[Unlocking chapters in your mod]] for an example of how to use incrementvar. | ||
[[Category:Console Commands]] |
Revision as of 18:49, 21 June 2006
A console command which can increment a given console variable.
It increments the given varname by the delta, whilst keeping the value within the bounds specified by minValue and maxValue
Usage
Syntax: incrementvar <varname> <minValue> <maxValue> <delta>
There is a bug (or at least a weird way of doing things), where incrementing a variable past the maxValue specified can set it to 0. The example linked below avoids this problem by first decrementing, then incrementing the specified variable.
See Unlocking chapters in your mod for an example of how to use incrementvar.