ConVar: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Fláráðr ljós (talk | contribs) (Add FCVAR_ARCHIVE save location) |
||
Line 21: | Line 21: | ||
</pre> | </pre> | ||
== Good practices == | == Good practices == | ||
Variables that you wish to be saved should be marked with flag [[FCVAR_ARCHIVE]]. Any cheat ConVar | Variables that you wish to be saved should be marked with flag [[FCVAR_ARCHIVE]]. These will be saved with the user bindings in <code>config.cfg</code>. Any cheat ConVar should not be archived. | ||
== See also == | == See also == |
Revision as of 04:57, 12 November 2015
For a description of what a Console Variable is, see Commands and variables.
Documentation on specific console variables can be found at Category:Console Variables. For creating a new Console Variable see this. Developer Console Control
ConVar( const char *pName, const char *pDefaultValue, int flags, const char *pHelpString, bool bMin, float fMin, bool bMax, float fMax );
The default value given as the second argument of the ConVar constructor is not the value set. To set a value, use:
pName->SetValue([value]);
Good practices
Variables that you wish to be saved should be marked with flag FCVAR_ARCHIVE. These will be saved with the user bindings in config.cfg
. Any cheat ConVar should not be archived.