[Console] CvarAdd command

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Console] CvarAdd command

Re: [Console] CvarAdd command

by D2JK » Fri May 26, 2017 5:22 am

The above question was left unanswered, so should I make a dedicated feature request for it then?

Re: [Console] CvarAdd command

by D2JK » Thu May 25, 2017 1:33 pm

Ah. I tried to look if a command like this already exists, but I missed this functionality in "eval". Eval seems more powerful as well. I wish someone had mentioned this when I asked in the "How do I" thread.

But now, while reading up the following table of eval expressions, I was also amazed to find out something: the console can not only compute exponentiation, it can do this even with non-integer exponents! Yet we don't seem to have a generic exponentiation functionality as a Decorate expression. Why is this?

Re: [Console] CvarAdd command

by Major Cooke » Thu May 25, 2017 12:18 pm

It's unwieldy as hell, and sometimes I couldn't get it to work at all.

Re: [Console] CvarAdd command

by Graf Zahl » Thu May 25, 2017 12:04 pm

Isn't the 'eval' CCMD sufficient?

[Console] CvarAdd command

by D2JK » Thu May 25, 2017 11:58 am

I'd like to suggest a new console command: CvarAdd. The command would add the given value to the given console variable.

Usage: CvarAdd <CvarName> <Value>

Examples:

CvarAdd Mouse_Sensitivity .01
CvarAdd FoV -5
Bind mwheelup CvarAdd MyVariable 4
Bind mwheeldown CvarAdd MyVariable -4

The mouse wheel bind example illustrates how this would be useful for mod developers trying to get something to look or positioned just right (utilizing the GetCvar() command).

Top