Global Game Variables

gi.cvar(variable_name, value, flags)

Declares and sets the variable to the value, and sets flags:

  • CVAR_ARCHIVE

saved to vars.rc

  • CVAR_USERINFO

added to userinfo when changed

  • CVAR_SERVERINFO

added to serverinfo when changed

  • CVAR_NOSET

can only be changed at command line

  • CVAR_LATCH

save changes until server restart

Returns the variable just set

NOTE: this is only used during the initialisation function

gi.cvar_set(variable_name, value)

Sets the variable to value and returns the variable just set

gi.cvar_forceset(variable_name, value)

Sets the variable to value and returns the variable just set. Forces the value?