Multvar: Difference between revisions
Jump to navigation
Jump to search
m (Remove Category:Core Console Commands) |
(added console command template) |
||
| Line 1: | Line 1: | ||
{{ | {{Console Command}} | ||
{{command|multvar}} multiplies the current value of the cvar provided by a factor while keeping it between two limits. | |||
==Syntax== | ==Syntax== | ||
Revision as of 14:10, 26 June 2023
Template:Console Command
multvar multiplies the current value of the cvar provided by a factor while keeping it between two limits.
Syntax
multvar CVAR MINVALUE MAXVALUE FACTOR
- CVAR: a console variable we want to change.
- MINVALUE: a minimum bound for our variable.
- MAXVALUE: a maximum bound for our variable.
- FACTOR: the number to multiply the current value of the cvar by.
If the product is out of the range specific by MINVALUE and MAXVALUE, the product will be clamped.
Examples
Set the voice chat volume to 50% of its current value:
multvar voice_scale 0 1 0.5
If voice_scale was 1, it is now at 0.5.
To set it back to its previous value use a factor of 2:
multvar voice_scale 0 1 2.0
Flip the sign of viewmodel_fov from positive to negative
multvar viewmodel_fov -180 180 -1
See also
- incrementvar add instead of multiply