This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-12-23 16:13:12

thegamemaker5000
Scratcher
Registered: 2008-09-06
Posts: 25

Can Scratch save?

Can scratch save your progress so next time you play/view it, your info is where it is? If yes, can it work anywhere, or you have to download it? Also, if yes, how can you make scratch save?

Offline

 

#2 2008-12-23 17:11:31

techy
Scratcher
Registered: 2008-12-17
Posts: 100+

Re: Can Scratch save?

You'll need to have a password system in you game.. heres a tutorial http://scratch.mit.edu/projects/Dave911/18421


Guppy Inc. making projects famous!
http://web-geeks.com/techy.gifhttp://web-geeks.com/grid.gifhttp://web-geeks.com/challenge.gif

Offline

 

#3 2008-12-23 17:57:38

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Can Scratch save?

techy wrote:

You'll need to have a password system in you game.. heres a tutorial http://scratch.mit.edu/projects/Dave911/18421

Even though thats not ACTUALLY saving, its the closest you can get =P


http://i.imgur.com/WBkM2QQ.png

Offline

 

#4 2008-12-24 11:25:50

thegamemaker5000
Scratcher
Registered: 2008-09-06
Posts: 25

Re: Can Scratch save?

It's a good way, but people can change the code by downloading to find out the pattern and then they will cheat on the game.

Offline

 

#5 2008-12-24 11:33:48

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: Can Scratch save?

thegamemaker5000 wrote:

It's a good way, but people can change the code by downloading to find out the pattern and then they will cheat on the game.

But you can also make it very confusing adding all sorts of functions such as

((  <+> ((  <->  ((  </>  )))) ))
which can make it a good deal harder to figure out.

You could also have someone save it upon download, so that the variables that were recorded are also saved.

Offline

 

#6 2008-12-24 16:48:26

demosthenes
Retired Community Moderator
Registered: 2008-02-19
Posts: 1000+

Re: Can Scratch save?

Sorry, I'm afraid it can't manipulate the file system.


I've taken a long hiatus, but I still visit sometimes. Give me some time to answer any messages you post on my projects!

Offline

 

#7 2008-12-24 17:40:55

thegamemaker5000
Scratcher
Registered: 2008-09-06
Posts: 25

Re: Can Scratch save?

shadow_7283 wrote:

You could also have someone save it upon download, so that the variables that were recorded are also saved.

How can I do that?

Offline

 

#8 2008-12-24 19:31:34

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: Can Scratch save?

thegamemaker5000 wrote:

shadow_7283 wrote:

You could also have someone save it upon download, so that the variables that were recorded are also saved.

How can I do that?

If variables have all the information stored (ex. 100 coins) then someone would have to just save it to their computer, and start up the program again (it won't work online) then the information would be loaded because the variables wouldn't have been set to 0.

Offline

 

#9 2008-12-24 22:24:32

thegamemaker5000
Scratcher
Registered: 2008-09-06
Posts: 25

Re: Can Scratch save?

shadow_7283 wrote:

If variables have all the information stored (ex. 100 coins) then someone would have to just save it to their computer, and start up the program again (it won't work online) then the information would be loaded because the variables wouldn't have been set to 0.

But then I need to destroy all the reset scripts and then it will be harder and slower to make projects because I have to reset the variables every time manually.

Offline

 

#10 2008-12-25 00:18:26

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Can Scratch save?

thegamemaker5000 wrote:

shadow_7283 wrote:

If variables have all the information stored (ex. 100 coins) then someone would have to just save it to their computer, and start up the program again (it won't work online) then the information would be loaded because the variables wouldn't have been set to 0.

But then I need to destroy all the reset scripts and then it will be harder and slower to make projects because I have to reset the variables every time manually.

This might work...
make another variable (called something like coinsSaved) and while you're playing the game, it always sets coinsSaved to the coins variable, but ONLY while you're playing the game. So when you reset it, it gives you an option to start a new game or continue your current game. Then it still resets the coins variable when you press the green flag but coinsSaved is still the same, and if you restart the game it resets coinsSaved and coins, and if you continue it sets coins to coinsSaved. See if that works, I've never tried it.


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#11 2008-12-25 15:45:17

thegamemaker5000
Scratcher
Registered: 2008-09-06
Posts: 25

Re: Can Scratch save?

hmnwilson wrote:

This might work...
make another variable (called something like coinsSaved) and while you're playing the game, it always sets coinsSaved to the coins variable, but ONLY while you're playing the game. So when you reset it, it gives you an option to start a new game or continue your current game. Then it still resets the coins variable when you press the green flag but coinsSaved is still the same, and if you restart the game it resets coinsSaved and coins, and if you continue it sets coins to coinsSaved. See if that works, I've never tried it.

But how can  make it so that the save variables are the same as the main variables?

Offline

 

#12 2008-12-25 16:04:10

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Can Scratch save?

Save the game's data to a list, and if you're playing offline, you can export the list (right-click on the list, then "Export", on Windows), and then import it.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#13 2008-12-25 19:44:40

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Can Scratch save?

thegamemaker5000 wrote:

hmnwilson wrote:

This might work...
make another variable (called something like coinsSaved) and while you're playing the game, it always sets coinsSaved to the coins variable, but ONLY while you're playing the game. So when you reset it, it gives you an option to start a new game or continue your current game. Then it still resets the coins variable when you press the green flag but coinsSaved is still the same, and if you restart the game it resets coinsSaved and coins, and if you continue it sets coins to coinsSaved. See if that works, I've never tried it.

But how can  make it so that the save variables are the same as the main variables?

When you start a new game:
<when I receive[ new game
<forever>
<set{ coinsSaved }to( <{ coins }>
<end>
[/blocks]
But if you choose to continue (note that this will delete the saved game once you load it):
[blocks]<when I receive[ continue
<set{ coins }to( <{ coinsSaved }>
<forever>
<set{ coinsSaved }to( <{ coins }>
<end>
[/blocks](you can use variables to make this into one script to save space)

But you're probably better off using the method technoguyx described because it holds more.


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#14 2008-12-25 20:03:40

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Can Scratch save?

Just to remind you, there is no way to save data to projects to your hard drive. If you refresh the project page in your browser there is no way that you can use data and make it reappear.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#15 2008-12-26 16:59:44

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Can Scratch save?

archmage wrote:

Just to remind you, there is no way to save data to projects to your hard drive. If you refresh the project page in your browser there is no way that you can use data and make it reappear.

I think we're talking about when you play the project offline, but yeah, you can't make it work online without using passwords.


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#16 2008-12-27 15:59:11

thegamemaker5000
Scratcher
Registered: 2008-09-06
Posts: 25

Re: Can Scratch save?

technoguyx wrote:

Save the game's data to a list, and if you're playing offline, you can export the list (right-click on the list, then "Export", on Windows), and then import it.

But then, the load/save thing will be a press a button to save/load. How can I make it so it can read and render the info to the variables?

Offline

 

#17 2008-12-29 13:29:16

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: Can Scratch save?

thegamemaker5000 wrote:

technoguyx wrote:

Save the game's data to a list, and if you're playing offline, you can export the list (right-click on the list, then "Export", on Windows), and then import it.

But then, the load/save thing will be a press a button to save/load. How can I make it so it can read and render the info to the variables?

I don't think that you can. You can use the:
-Save/ Open button
-Import/ Export button
-And you can always have the program have a system for codes (your code is F46 the program might read that as fighting points = 46)
But other then these Scratch doesn't have a way for direct saving and loading.

Offline

 

Board footer