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

#1 2010-07-23 04:39:27

orangeoz
Scratcher
Registered: 2010-02-18
Posts: 100+

Save / Load Function!

Hi, I need A Simple Save/load script that will give you a code of your x posision, y posision and score, and all that so you can go on another computer and load it there!

Thanks!

Orangeoz

Last edited by orangeoz (2010-07-23 04:39:51)


http://i1187.photobucket.com/albums/z393/OrangeOz/orangeozsig.png

Offline

 

#2 2010-07-23 05:19:31

helltank
Scratcher
Registered: 2010-05-21
Posts: 1000+

Re: Save / Load Function!

Hmm... try having 3 variables:

SaveX
SaveY
SaveLevel

Then:
When I recieve save
set SaveX to X position
Set SaveY to Y position
Set SaveLevel to Level

and

When I recieve load
Change to costume #SaveLevel
Set X position to SaveX
Set Y posiiton to SaveY

you might also want to have

When I recieve ResetSave
Set SaveX to 0
Set SaveY to 0
Set SaveLevel to 0


Error:Signature could not load. Please wait for an indefinite amount of time, until you realize you're gullible and go off to look for another potentially interesting signature to stare at.

Offline

 

#3 2010-07-23 05:35:23

orangeoz
Scratcher
Registered: 2010-02-18
Posts: 100+

Re: Save / Load Function!

helltank wrote:

Hmm... try having 3 variables:

SaveX
SaveY
SaveLevel

Then:
When I recieve save
set SaveX to X position
Set SaveY to Y position
Set SaveLevel to Level

and

When I recieve load
Change to costume #SaveLevel
Set X position to SaveX
Set Y posiiton to SaveY

you might also want to have

When I recieve ResetSave
Set SaveX to 0
Set SaveY to 0
Set SaveLevel to 0

But Is There Any Way I Could Make It Say A Code To Use Someware Else?


http://i1187.photobucket.com/albums/z393/OrangeOz/orangeozsig.png

Offline

 

#4 2010-07-23 06:37:10

melikecheese
Scratcher
Registered: 2010-06-09
Posts: 500+

Re: Save / Load Function!

You mean like this?

Last edited by melikecheese (2010-07-23 06:37:50)


http://i51.tinypic.com/987rb5.jpg
I am Dave! Yognaught.

Offline

 

#5 2010-07-23 09:22:57

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

Re: Save / Load Function!

orangeoz wrote:

helltank wrote:

Hmm... try having 3 variables:

SaveX
SaveY
SaveLevel

Then:
When I recieve save
set SaveX to X position
Set SaveY to Y position
Set SaveLevel to Level

and

When I recieve load
Change to costume #SaveLevel
Set X position to SaveX
Set Y posiiton to SaveY

you might also want to have

When I recieve ResetSave
Set SaveX to 0
Set SaveY to 0
Set SaveLevel to 0

But Is There Any Way I Could Make It Say A Code To Use Someware Else?

Just have the game tell you those three variables when you want to save, and then have the other game ask for them when you want to load. Example:
http://i29.tinypic.com/2zsvixi.gif

Last edited by Harakou (2010-07-23 09:27:08)


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

 

#6 2010-07-23 11:46:26

graham7sarah9
Scratcher
Registered: 2009-07-19
Posts: 28

Re: Save / Load Function!

It's not easy to do that in Scratch. The best way is to give them a code. For example, if * were a random number, you could give them a code like:

Code:

*-xposition-***-****-yposition-***-score-**

It might be easy to crack, but at least you can use a parsing technique.

Offline

 

Board footer