Login

Fancade Wiki

Updated Set Variable.md (markdown)

... ...
@@ -16,8 +16,16 @@ As you can see, we've set the variable to 1, but the Get Variable block outputs
16 16
17 17
This is because those two variables are local, meaning they can't transfer variable information from one place to another (inside a block to outside the block, or into another block and vice versa).
18 18
19
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 variables name. Which would add a $ at the start of the name.
19
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 `$` at the start of their name.
20 20
21 21
Note that two variables with the same name with one being a global will not count as the same variables (e.g Number and $Number are not the same).
22 22
23
[[/uploads/20210110_210438.jpg]]
... ...
\ No newline at end of file
0
[[/uploads/20210110_210438.jpg]]
1
2
### Saved variables
3
4
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 `!` at the start of their name.
5
6
As the name implies, saved variables persist their value from one game session to the next. This is true whether the user ends the game by winning, dying, or simply pausing and returning to the menu.
7
8
Additionally, saved variables are shared across all levels in the same game. This allows a player's actions in one level to affect their gameplay in other levels, and to keep track of purchases from the [[Menu Item|Blocks/Menu Item]] block.
... ...
\ No newline at end of file
Fancade Wiki