Skip to content

material_var

get_float

get_float() -> number

Returns a float value.

Usage

local val = var:get_float();

get_int

get_int() -> number

Returns an integer value.

Usage

local val = var:get_int();

get_string

get_string() -> string

Returns a string value.

Usage

local val = var:get_string();

get_vector

get_vector() -> number, number, number

Returns a vector value.

Usage

local x, y, z = var:get_vector();

set_float

set_float(val: number)

Sets a float value.

Parameters

Name Type Description
val number Value

Usage

var:set_float(0.1);

set_int

set_int(val: number)

Sets an integer value.

Parameters

Name Type Description
val number Value

Usage

var:set_int(0);

set_string

set_string(val: string)

Sets a string value.

Parameters

Name Type Description
val string Value

Usage

var:set_string('envcube');

set_vector

set_vector(val: table[number])

Sets a vector value.

Parameters

Name Type Description
val table[number] Vector parameters (up to 4)

Usage

var:set_vector({0, 1, 2, 3});