ModifyGlobalVariableAction ​
Inherits: EventAction < Resource
Universal action to modify a global variable (numeric operations and string manipulation)
Properties ​
String | variable_key | "" |
Operation | operation | Operation.ADD |
int | amount_int | 1 |
float | amount_float | 1.0 |
String | append_text | "" |
Methods ​
String | get_function_description() |
Dictionary | save() |
void | load_data( data: Dictionary ) |
Enumerations ​
enum Operation ​
The options of operation: add, subtract, multiply, divide, append, toggle.
- ADD =
0 - SUBTRACT =
1 - MULTIPLY =
2 - DIVIDE =
3 - APPEND =
4
Property descriptions ​
String variable_key = "" ​
The name of the global variable.
Operation operation = Operation.ADD ​
What to do with the variable (add, subtract, multiply, divide, append or toggle).
Numeric Values
int amount_int = 1 ​
The whole number for the operation.
float amount_float = 1.0 ​
The decimal number for the operation.
String Values
String append_text = "" ​
The text to add to a text variable.
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.