Discuss Scratch

111Beastmode
Scratcher
100+ posts

How To Save Data In A Scratch Clicker?

Hey I need A Simple Good Helpful Explanation on how to save data on a scratch clicker(My game: https://scratch.mit.edu/projects/115788623/ )

if you Helped It Would be SOO nice

miniepicness
Scratcher
1000+ posts

How To Save Data In A Scratch Clicker?

Highscore data or personal highscore data, regular highscore data is easier, personal highscore data is almost impossible
111Beastmode
Scratcher
100+ posts

How To Save Data In A Scratch Clicker?

Well I was thinking about If you can get a code and when you type it in you have the same amount of cookies you had last time.
miniepicness
Scratcher
1000+ posts

How To Save Data In A Scratch Clicker?

Oh, I dont actually know how to do that,
If you want to make a world record I can help you with that

Maybe I can remix and try to do it?

Last edited by miniepicness (Nov. 8, 2016 01:44:19)

111Beastmode
Scratcher
100+ posts

How To Save Data In A Scratch Clicker?

Go Right ahead.. I would Gladly love the help so go remix
miniepicness
Scratcher
1000+ posts

How To Save Data In A Scratch Clicker?

Basic Code Saving ( took a while to make, i just made it):

https://scratch.mit.edu/projects/129631169/

Last edited by miniepicness (Nov. 8, 2016 02:04:00)

111Beastmode
Scratcher
100+ posts

How To Save Data In A Scratch Clicker?

DUDE 100% awesome but…. you see in mine I have a variable for every shop item? maybe can you use that so when they use the code they have the exact same cookies CPS and shop items? and maybe you can add some random letters to make it secure so you can't make like 99999999 cookies. Thanks
Jconway1
Scratcher
77 posts

How To Save Data In A Scratch Clicker?

Yo! I actually have a project that has a save function here coin boys - check inside and look for the save sprite.

Basically what you want to do is add all the things you are saving. I.e. this case the cookies, and I assume upgrades to clicking strength, and add those items to a list when you are saving.

so say we have 500 cookies and upgrade 1 is level 5 and upgrade 2 is level 2

we add cookies to the list, the upgrade level of upgrade 1 to the list, the upgrade level of upgrade 1 to the list and so on.

Then we turn that into a string someone can save.

in the case of my project above, the string would be something like 500!5!2 (i.e. 500 cookies, U1 = 5, U2 =2)

A simpler one is on my test account here. But it may not be suited. I'll try and upgrade it for you if you don't fully understand.
111Beastmode
Scratcher
100+ posts

How To Save Data In A Scratch Clicker?

That Is really helpful but for some reason this 1 thing is SOOO hard for me to learn so if you added a little more detail that would be great
Jconway1
Scratcher
77 posts

How To Save Data In A Scratch Clicker?

I went ahead and remixed it and added a save and load function, with some explanations inside. Hopefully by seeing it work on your own project it will make some more sense.

https://scratch.mit.edu/projects/129651453/

Press the Save icon in the bottom left to use it. It will ask you to save or load (type either save or load (or s or l)) and then the rest should work it's magic

The way I like to imagine this thing is that its like a person given a bunch of boxes and items are coming down a conveyor belt. These items keep coming but the guy will put those things in the first box until he is told not too (when he sees an ! ) then he will put the things in the next box until he's told not to again (another ! ) and keep going until he's filled up all the boxes.

That's essentially whats happening except instead of boxes it's the variables, and instead of items it's the variables values your setting.

Last edited by Jconway1 (Nov. 8, 2016 06:06:56)

111Beastmode
Scratcher
100+ posts

How To Save Data In A Scratch Clicker?

I can not thank you enough for the help. Now that added this feature I can update my game to v3… something I wanted to do for a long time XD

Powered by DjangoBB