Save Block Question

Hello everyone, as some of you know I’ve been working with Flowlab.io since April 2020 as buy3get5free, since then I have struggled to understand how to use the save behavior in different situations. One thing I’m having trouble with is that I can’t save a number and use and use in another part of the game. Any help or advice would be very helpful. Thanks.

2 Likes

could you send a link?

1 Like

You can use it in different parts of the game, you just need “load” the number first.
“save” will over write any number that’s in it.

For example:

  • You collect and save “3” coins in level 1.
  • To keep the coins in level 2, you “load” the save to get your value “3”.
  • Then “save” all the coins you collect that is added to 3.

You can also look at my “shop” example to see how saves work:

2 Likes

@JR01, is there any chance you could show me what that would look like?

1 Like

@AbstractGallery… it’s in the “Coin” bundle in the player…

Edit:
With the demand of character select, I also now have an example for that:

1 Like

How do you save a level? For example if you are on a really hard puzzle level and you quit because its too hard and then come into the game again and your progress saves. How do you do that? Or another example if you make a game with like 100 level and a plyer stops playing at lets just say level 45 and then the next day the payer comes back into the game and can continue from where they left from. That is what I will probably need in my game.

1 Like

@Cuts_ups, your looking for a “Save State” in which Flowlab doesn’t have yet.

To do that now, you have to save the positions of all the puzzle pieces with there own saves
It would be best to reset the puzzles when you return to the level.

1 Like

what about the levels? Edit: not in the middle of a level, just not to restart the whole game from level1

1 Like

That’s going to be a lot of work

1 Like

with levels you use get to get there level save it and when the player comes back read it and put it through a bunch of filters that lead to there specific levels

1 Like

Levels reset on there own, so restarting the level will reset the puzzle.


If you want to save puzzles (/levels) that you unlocked, you need to make a save for each level.
Like:
0 = Locked (saves are automatically 0 when nothing is saved to them)
1 = Unlocked

So when you restart, the levels that unlocked stay unlocked.

1 Like

You may be thinking about Save the wrong way. Maybe this will help clarify how it works:

  1. Think of “Save” as storing a value on the player’s computer (because that is literally what it does)

  2. When you input a number into the “save” it stores that number in the browser.

  3. When you activate the “read” input, it reads whatever value was saved last (maybe even the previous time the player played this game)

So you need to first “save” a number. Then, at some later time - maybe in a new level, or maybe even in a new game the next day, you can “read” the value that was saved to retrieve it.

Does this help at all?

2 Likes

Thank you @grazer, but how would I set it up? Every time I try and set up a save into my game it doesn’t work. Do I output the save to an input of a number to get the value back? How do I make know it worked?

Here is an example (from the Examples page) https://flowlab.io/game/play/686232

1 Like

I have this same kind of problem but it blocks me from connecting the label to the save…

1 Like