GetCVar (script event)
The information on this page is specific to Enemy Territory: Quake Wars .
Game class
This event operates on an instance of the game class type idThread , accessible via sys identifier.
Description
Returns an object for a cvar that supports events for returning values.
Usage
object getCVar( string name , string default )
Parameters
- [name] - Name of the cvar.
- [default] - Default value to give the cvar if it doesn’t already exist.
Examples
object si_timeLimit = sys.getCVar( "si_timeLimit" , "20" );
float time = si_timeLimit.getFloat();
Notes
ETQW 1.4 has a bug where it doesn’t keep track of the objects returned, thus each call to getCVar will create a new object. This can lead to a situation where the game runs out of free objects.