Saving "Diamonds" in my flowlab game

hey

I’ve been using Flowlab for like 2 weeks now (cuz i need to do it for a school project),

and i decided to do something unique in my class & make a shop (currency is diamonds), i used the save block in gameflow but it didn’t transfer the amount of diamonds the player had collected over levels, can anyone help me?

Here is my game link: https://flowlab.io/game/play/1414076

Picture of my code for saving:
(DATA SAVER object basically just takes you to next lvl)
Screen Shot 2020-05-14 at 12.54.47 PM

Picture of my code for loading the save in shop level
Screen Shot 2020-05-14 at 12.56.15 PM

TL;DR
i need help saving diamonds the player has collected over levels

well @RageX so what Block or UI tells you the number of daimonds you have.
beacause i believe all you have to do is set a setting to a certain thing ok,
Screenshot 2020-05-14 at 6.43.17 AM
My cursor is hovering over “Behavior Reset” which is what you want to change.
Set to keep between levels. but do this to what block tells you your diamonds. Ok? pretty simple

Ok so i checked out the game and its good and all but i found your problem. to fix follow easy instructions:

1 make new block and call shop

2 recreate the script that collects the daimonds from “Spaceship” in the “shop” but instead of using
Collisoin use mailbox (Remove the script from the “Spaceship” once done)
Screenshot 2020-05-14 at 7.00.16 AM
(This is what you want in “Shop” block)

3 make it so when spaceship touch it sends a message to shop
Screenshot 2020-05-14 at 6.56.04 AM
(This is what you want in “Spaceship” block)

4 set the “Shop” block settings to as i explained above to keep between level

5 remove the daimond script from the “Alien” block, if done right the script inside him is useless.

And you have a working daimond scorebored. (IF DONE RIGHT)

Your problem is that the save is in the “in” input, not the others. In activates the number, not updates it. If you put the input into + or Set it will work. :slight_smile:

@RageX put the save in set

should i put it in set for save or read or both?

Read for the once block.

@RageX, found your problem:

You need to use “Set” to change the number block.
2020.05.15-10.00_01

Going strait from Save to Label also works
2020.05.15-10.01

That’s what I said @“JR 01”

I just saw the convo getting long for a problem, so I glanced over it and screenshot the solution.

I see now that you already said something similar @meburningslime

Still doesn’t work

Here is the code for what happens when you hit a diamond (it’s supposed to save everytime you hit a diamond)

Screen Shot 2020-06-03 at 1.04.00 PM

And here is the code for loading in the diamonds when you reach the next level (shop level)

Screen Shot 2020-06-03 at 1.03.36 PM

  1. It resets when you hit a diamond because you start at 0.
    You need to load the save using a separate block to continue counting.
    1

  2. The save isn’t going into the label, just Save —> Label.
    2

can i et more deatails im new

?