I'm new, please help

I followed the basic tutorials with the adding coins etc. I have them for each individual level but I do not know how to total up the score of all the levels.

Right now, the score resets to 0 after each level. Is there a way to continue that score in the second level?

Here is the link to my game. The scores are saved in a sprite on the left of the canvas.

Thank you so much.

You can try changing this option:
save

You can also use the save behavior. Tell me if you want a example on it.

1 Like

Hi! I tried the other two behavior resets as well, but the score still returned to 0 on new levels. Also, when I used the other behavior resets, if the player died, they will start off with the coin score they had when the level restarts.

I tried doing something where entering the next level would trigger a save command that would save the current score for the next level. Do you think that is possible?

Hi, I checked out some of the save examples but I could not get them to work for some reason. I would really appreciate it if you could send me an example! Thank you!

Ok, I’ll work on it now

1 Like

Hello @kevinyang This should work (you can name the save to whatever you want, just make sure that they are all named the same thing.)

2 Likes

Hey, @USERNAME55 thank you so much! Now the score doesn’t refresh when the player progresses into a new level. However, I did run into the problem where even if the player dies, they still retain all of the coins. Do you know a way to fix that? I was thinking I could set up a command where when the player dies, it would send a message to the score tab telling it to somehow reset the score to 0. It’s totally fine if you are unable to help. This project is just for learning purposes. Thanks again.

Hello @kevinyang You can make it reset when the player dies. I can show you right now.

In everything that can kill the player, you will need to add this.

3 Likes

Hopefully, you understand how saves work now.

1 Like

Yeah! I cannot thank you enough! It was really an eye-opener. I really appreciate your help!

You’re welcome! The more time you spend using behaviors, the more you will understand.