Introduction
Functions
Misc
Introduction/defines-variable
Variable Define
Just like in every other language, you can define variables that can be accessed later.
You can define them using var_define define, example:
var_define->active = false, private, editoronly
The line above defines a variable with a default state of False, and it is invisible in the
Part Edit Menu. It is only editable in the editor if its visibility is set to public.
Always separate parameters with (,) operator.
Editor Only property can also be: physonly and both.
Accessing Defined Variables
You can easily access and modify values of variables, example:
gm_stock->console_log(active)
Line above will print the state of previously defined variable.
vstock->switch_var(active, false)
Line above changes the active variable to false.