Set Variable: Difference between revisions
m
Substitute any instances of ` to <code> tags
-u ndefined- (talk | contribs) (Add infobox, and demystify filenames) |
-u ndefined- (talk | contribs) m (Substitute any instances of ` to <code> tags) |
||
Line 19: | Line 19: | ||
Let's say you have a script inside a block that sets a variable to 1, and you have a script outside of the block to inspect that variable. | Let's say you have a script inside a block that sets a variable to 1, and you have a script outside of the block to inspect that variable. | ||
[[File:Set_Variable_global_example.png]] | [[File:Set_Variable_global_example.png]] | ||
Line 27: | Line 26: | ||
If we want a variable to share information to another variable in different places, then we would have to globalize them. | If we want a variable to share information to another variable in different places, then we would have to globalize them. | ||
You can simply press the Global button on the keyboard where you type the variable's name. Global variables gain a | You can simply press the Global button on the keyboard where you type the variable's name. Global variables gain a <code>$</code> at the start of their name. | ||
Note that two variables with the same name with one being a global will not count as the same variables (e.g | Note that two variables with the same name with one being a global will not count as the same variables (e.g <code>Number</code> and <code>$Number</code> are not the same). | ||
[[File:Set_Variable_button_global.png]] | [[File:Set_Variable_button_global.png]] | ||
Line 36: | Line 35: | ||
Saved variables were added in Fancade 1.6. Like global variables, you can make a saved variable by pressing the Local/Global/Saved button on the keyboard where you type the variable's name. | Saved variables were added in Fancade 1.6. Like global variables, you can make a saved variable by pressing the Local/Global/Saved button on the keyboard where you type the variable's name. | ||
Saved variables gain a | Saved variables gain a <code>!</code> at the start of their name. | ||
[[File:Set_Variable_button_saved.png]] | [[File:Set_Variable_button_saved.png]] |