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.
could you send a link?
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.
- 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:
@JR01, is there any chance you could show me what that would look like?
@AbstractGallery… it’s in the “Coin” bundle in the player…
With the demand of character select, I also now have an example for that:
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.
@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.
what about the levels? Edit: not in the middle of a level, just not to restart the whole game from level1
That’s going to be a lot of work
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
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.
0 = Locked (saves are automatically 0 when nothing is saved to them)
1 = Unlocked
So when you restart, the levels that unlocked stay unlocked.
You may be thinking about Save the wrong way. Maybe this will help clarify how it works:
Think of “Save” as storing a value on the player’s computer (because that is literally what it does)
When you input a number into the “save” it stores that number in the browser.
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?
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?
I have this same kind of problem but it blocks me from connecting the label to the save…