How to use the save behavior

I’ve been on flowlab for a while now and, it came to my attention that I had never used the save block! I’ve been experimenting but I can’t seem to figure it out. I want my game to save every time you hit a certain object here is an example I want to save when you hit the suit in this EXAMPLE level https://flowlab.io/game/view/1312591 can anyone help?

it’s alright I think i figured it out

The save block doesn’t save your game, it saves a value that you can get back later. You could use it to:

  • Save a high score
  • Save the level the player was on to return on the next load
  • Save the players choice of character skin
  • etc

When you trigger a save, it stores the value you send in. When you trigger a read, it returns the last saved value. Make sure that you set the name as well, since it is used to save and read the value.

okay thank you! i have seen in many games they have a save feature how does that work?

oh sorry that was already answered

thank you for the help! I feel kind of stupid

but, you can use it to save the level you are on?

I think we’d need more info as to what you’re trying to accomplish. What are you trying to save mid level?

I also have a shop example @jessetime360 that uses Saves.
And no, you can’t save a level to it, But you can save a number for the level.
Like having an object in just in that level to put the number the level is on into a Save, or something like a counter that counts how many levels you were on.

Shop example:
https://flowlab.io/game/play/1202461