Skip to content

SetGlobalVariableAction ​

Inherits: EventAction < Resource

Universal action to set a global variable to a specific value

Properties ​

Stringvariable_key""
intvalue_int0
floatvalue_float0.0
boolvalue_boolfalse
Stringvalue_string""
intvalue_type0 # 0=Int, 1=Float, 2=Bool, 3=String

Methods ​

Stringget_function_description()
Dictionarysave()
voidload_data( data: Dictionary )

Property descriptions ​

String variable_key = "" ​

The name of the global variable.

Value to Set

int value_int = 0 ​

The whole number to set.

float value_float = 0.0 ​

The decimal number to set.

bool value_bool = false ​

The yes/no value to set.

String value_string = "" ​

The text to set.

Value Type

int value_type = 0 # 0=Int, 1=Float, 2=Bool, 3=String ​

Which kind of value to set (whole number, decimal, yes/no or text).

Method descriptions ​

String get_function_description() ​

The sentence the editor shows for the action, with {placeholders} for its values.

Dictionary save() ​

The state of the action for a save.

void load_data( data: Dictionary ) ​

Restores the state of the action from a save.