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

#1 2010-08-10 19:25:29

murpho
Scratcher
Registered: 2010-07-01
Posts: 1000+

Better save script

I was wondering if there is a way to make a save script be able to save location, score, health and so on so when you save then exit the project you can load your stuff that you saved. Is there such a easy way that i didnt just see it


https://lh6.googleusercontent.com/-l-rgCPiQ9pY/Tp32n1MRUEI/AAAAAAAADoA/HNQWbO8OOaA/s510/soccerleague.gif

Offline

 

#2 2010-08-10 19:37:30

Thomas96
Scratcher
Registered: 2010-03-25
Posts: 100+

Re: Better save script

I was thinking about that for the GTA, but I have no idea how to do it.

Offline

 

#3 2010-08-10 22:41:18

murpho
Scratcher
Registered: 2010-07-01
Posts: 1000+

Re: Better save script

Me either  hmm


https://lh6.googleusercontent.com/-l-rgCPiQ9pY/Tp32n1MRUEI/AAAAAAAADoA/HNQWbO8OOaA/s510/soccerleague.gif

Offline

 

#4 2010-08-10 22:51:01

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Better save script

Well, you could
1) Have the project store the data in a list, then you save the project itself when you're done playing; you re-open it later and it loads from the list.
2) The project gives you a code when you click an in-game save button. Then later you input the code and it loads it.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2010-08-10 23:01:27

murpho
Scratcher
Registered: 2010-07-01
Posts: 1000+

Re: Better save script

I have an idea where the list is saved when you exit the project (meening you have to download it) then there is an istant load feature that auto loads abd i was thinking of an auto save feature so wait 5 sec and score health xp p_level terrain# and so forth


https://lh6.googleusercontent.com/-l-rgCPiQ9pY/Tp32n1MRUEI/AAAAAAAADoA/HNQWbO8OOaA/s510/soccerleague.gif

Offline

 

#6 2010-08-11 14:14:23

Thomas96
Scratcher
Registered: 2010-03-25
Posts: 100+

Re: Better save script

Have a list, when save is clicked set list 1 to health, list 2 to score, 3 to scroll x, etc. But at any time you can save over it, load it or delete the data, instead of just auto saving and loading,

                          I'll try to make this into a project that you can download and try...

Offline

 

#7 2010-08-11 18:34:57

Thomas96
Scratcher
Registered: 2010-03-25
Posts: 100+

Re: Better save script

I've made the project but when compiled, the list deletes... Now gettin annoyed

Offline

 

#8 2010-08-11 20:34:42

murpho
Scratcher
Registered: 2010-07-01
Posts: 1000+

Re: Better save script

I know how to make a save script  hmm


https://lh6.googleusercontent.com/-l-rgCPiQ9pY/Tp32n1MRUEI/AAAAAAAADoA/HNQWbO8OOaA/s510/soccerleague.gif

Offline

 

#9 2010-08-11 20:35:55

Thomas96
Scratcher
Registered: 2010-03-25
Posts: 100+

Re: Better save script

I've made one but when the project is compiled and opened it deletes the list...

Offline

 

#10 2010-08-11 20:43:52

murpho
Scratcher
Registered: 2010-07-01
Posts: 1000+

Re: Better save script

I think I know what to do.... I'll upload something


https://lh6.googleusercontent.com/-l-rgCPiQ9pY/Tp32n1MRUEI/AAAAAAAADoA/HNQWbO8OOaA/s510/soccerleague.gif

Offline

 

#11 2010-08-11 20:50:18

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Better save script

a save Script? Here: My savable game You can save your position, stop the game, start it again, click load, and the game will automatically load you position, level, and velocity.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#12 2010-08-11 20:54:12

Thomas96
Scratcher
Registered: 2010-03-25
Posts: 100+

Re: Better save script

Yeah but, I'm compiling my game with chirp and I want the save data to remain after it closes, currently it doesn't

Offline

 

#13 2010-08-11 21:08:27

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Better save script

Thomas96 wrote:

Yeah but, I'm compiling my game with chirp and I want the save data to remain after it closes, currently it doesn't

Oh. I don't think you can do that unless you make a save block, which actually isn't that hard.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#14 2010-08-11 21:18:48

murpho
Scratcher
Registered: 2010-07-01
Posts: 1000+

Re: Better save script

i made it work!!! -=-=- REQUIRES YOU TO DOWNLOAD GAME-=-=-
http://scratch.mit.edu/projects/murpho/1241655


https://lh6.googleusercontent.com/-l-rgCPiQ9pY/Tp32n1MRUEI/AAAAAAAADoA/HNQWbO8OOaA/s510/soccerleague.gif

Offline

 

#15 2010-08-11 21:28:26

Thomas96
Scratcher
Registered: 2010-03-25
Posts: 100+

Re: Better save script

Posted my one HERE!
Still need to work out how to make it work in an .exe file...

Offline

 

#16 2010-08-11 21:30:17

Thomas96
Scratcher
Registered: 2010-03-25
Posts: 100+

Re: Better save script

ScratchReallyROCKS wrote:

Thomas96 wrote:

Yeah but, I'm compiling my game with chirp and I want the save data to remain after it closes, currently it doesn't

Oh. I don't think you can do that unless you make a save block, which actually isn't that hard.

I've made a save list, even when the scripts are restarted, click stop then green flag it will still have the info, but when compiled, opened, changed, closed, and reopened it doesn't

Last edited by Thomas96 (2010-08-12 13:48:58)

Offline

 

#17 2010-08-12 13:50:21

Thomas96
Scratcher
Registered: 2010-03-25
Posts: 100+

Re: Better save script

Any help?

Offline

 

#18 2010-08-12 13:54:07

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Better save script

can't do it in exe file because it doesn't save to the project.

Offline

 

#19 2010-08-12 13:55:16

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Better save script

what you CAN do is use bingo's file blocks for example  smile
---
mad
http://i35.tinypic.com/1zgwcnm.png

Offline

 

#20 2010-08-12 13:58:26

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Better save script

Well funny you should ask this. LS97 all day I have been asking you for things and help all for Claw. Im currently finishing it for v0.9 it has saving enabled as it contains a save file that you can save to!


You can now reach me on Twitter @johnnydean1_

Offline

 

#21 2010-08-12 14:13:31

Thomas96
Scratcher
Registered: 2010-03-25
Posts: 100+

Re: Better save script

LS97 wrote:

what you CAN do is use bingo's file blocks for example  smile

But it doesn't work on my computer!!

Offline

 

#22 2011-12-13 08:06:31

scratchewik
New Scratcher
Registered: 2011-11-28
Posts: 2

Re: Better save script

Thomas96 wrote:

Have a list, when save is clicked set list 1 to health, list 2 to score, 3 to scroll x, etc. But at any time you can save over it, load it or delete the data, instead of just auto saving and loading,

                          I'll try to make this into a project that you can download and try...

yes please

Offline

 

#23 2011-12-13 08:57:46

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Better save script

scratchewik wrote:

Thomas96 wrote:

Have a list, when save is clicked set list 1 to health, list 2 to score, 3 to scroll x, etc. But at any time you can save over it, load it or delete the data, instead of just auto saving and loading,

                          I'll try to make this into a project that you can download and try...

yes please

Thomas96 wrote:

Posted my one HERE!
Still need to work out how to make it work in an .exe file...

Offline

 

#24 2011-12-13 16:40:48

scratchewik
New Scratcher
Registered: 2011-11-28
Posts: 2

Re: Better save script

I am trying to make a big game with about 30 levels and score and a store with weapons like swords you can buy and I need to know how to save.

Offline

 

#25 2011-12-13 18:45:46

danwoodski
Scratcher
Registered: 2009-12-23
Posts: 100+

Re: Better save script

If you don't mind that it can't be put on the website,
1. Get  Claw
2. Use the Scratch Live blocks to save stuff online just like you would use variables.

Last edited by danwoodski (2011-12-13 18:47:12)


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://dl.dropbox.com/u/12506914/Pics/p2e-2.png&link2=http://dl.dropbox.com/u/12506914/Pics/ms.png&link3=http://dl.dropbox.com/u/12506914/Pics/block%20lib.png
Starting to move on to other languages, but I'll still be around from time to time  smile

Offline

 

Board footer