global.set 3
Set a global variable that can be referenced from any script and by any player in the room
Return value
Return Type | Description |
---|---|
void | This function doesn't return anything |
Parameters
Parameter | Type | Description |
---|---|---|
1 | any | A variable to store. Accepted types: bool, float, int, string |
2 | string | Identifier to get the stored value |
Examples
-- save a value "100" on a global variable
global.set(100, "some_stored_integer")
-- save a value "true" on a global variable
global.set(true, "some_stored_bool")
-- save a value "hello!" on a global variable
global.set("hello!", "some_stored_text")