⚙️ConVar

Table to work with CConVars.

ConVars are game variable that can be used to retrieve or change some game engine settings.

Find(name: string): CConVar|nil

Name
Type
Description

name

string

Returns the found ConVar.

Example

local convar = ConVar.Find("dota_camera_distance")
local camera_distance = ConVar.GetFloat(convar)

GetString(convar: CConVar): string

Name
Type
Description

convar

Returns string value of the Convar


GetInt(convar: CConVar): integer

Name
Type
Description

convar

Returns int value of the Convar


GetFloat(convar: CConVar): number

Name
Type
Description

convar

Returns float value of the Convar


GetBool(convar: CConVar): boolean

Name
Type
Description

convar

Returns boolean value of the Convar


SetString(convar: CConVar, value: string): nil

Name
Type
Description

convar

value

string

Assigns new string value to the ConVar


SetInt(convar: CConVar, value: integer): nil

Name
Type
Description

convar

value

integer

Assigns new int value to the ConVar


SetFloat(convar: CConVar, value: number): nil

Name
Type
Description

convar

value

number

Assigns new float value to the ConVar


SetBool(convar: CConVar, value: boolean): nil

Name
Type
Description

convar

value

boolean

Assigns new boolean value to the ConVar

Last updated