Pages: 1 2
Topic closed
You can make save slots by making lists. In each list, the items in the list can be set to variables like level number, checkpoint, items, x/y pos (unless you don't want to go that far), etc.
Offline
Sorry, but a real save/load script is impossible at the moment.
You still have options, though. The best way is to use a password system. Every time you hit a certain point you can give the player a new password, and then make it so that they can enter the password before starting the game. You can even make it calculate the password in-game!
Another more complicated way is to use lists, but unfortunately, the game must be downloaded first. Basically, you'd add all the important information to a list, and then tell the player to click the "save" button at the top of the program, so that it's there when you open the game again. Then, when you press the green flag, it would use all that information to bring you back to where you were!
It's more difficult than just having blocks to automatically save, but it's still possible. Good luck!
Last edited by hmnwilson (2010-07-19 19:24:01)
Offline
hmnwilson wrote:
Sorry, but a real save/load script is impossible at the moment.
Uhhh..no it's not, I've made a script that saves and loads a game, including the pen. (I never uploaded it if you're wondering)
Offline
ScratchReallyROCKS wrote:
hmnwilson wrote:
Sorry, but a real save/load script is impossible at the moment.
Uhhh..no it's not, I've made a script that saves and loads a game, including the pen. (I never uploaded it if you're wondering)
can you please tell me how it would be great
Offline
murpho wrote:
can you show me the script with the blocks
I think this is the script you're looking for:
<when I receive[ save game
delete "all" on list "save list"
add <x position> to "save list"
add <y position> to "save list"
add <{ Score }> to "save list"
etc.
And when you load the game...
<when I receive[ load game
<set x to( item 1 on "save list" )>
<set y to( item 2 on "save list" )>
<set{ Score }to( item 3 on "save list" )>
etc.
However, this only works offline and if you save the project after you activate the save script.
Offline
<when green flag clicked>
<forever>
<if><< mouse touching save <and>and mouse down
<set{savedx }to(<x position>
<set{savedy }to( <y position>
<set{savedd }to( <direction>
<stop script> >>
is my save script, and
<when green flag clicked>
<forever>
<go to x savedx )y
savedy
<point in direction( savedd
<stop script>
was my load script.
Offline
murpho wrote:
ScratchReallyROCKS wrote:
hmnwilson wrote:
Sorry, but a real save/load script is impossible at the moment.
Uhhh..no it's not, I've made a script that saves and loads a game, including the pen. (I never uploaded it if you're wondering)
can you please tell me how it would be great
I'll upload something...
Offline
ScratchReallyROCKS wrote:
murpho wrote:
ScratchReallyROCKS wrote:
Uhhh..no it's not, I've made a script that saves and loads a game, including the pen. (I never uploaded it if you're wondering)can you please tell me how it would be great
I'll upload something...
Okay, I finished it: here it is
Offline
I'm NEW to Scratch, so this is both a question and an answer:
Can alterable values of some sort be used online?
Cause if so, you could just make checkpoints throughout the level,
and when you touch the checkpoints, set the alterable values to the current
x and y positions and the current level.
Offline
MabonBaladevaKain wrote:
I'm NEW to Scratch, so this is both a question and an answer:
Can alterable values of some sort be used online?
Cause if so, you could just make checkpoints throughout the level,
and when you touch the checkpoints, set the alterable values to the current
x and y positions and the current level.
By "alterable values," do you mean variables? Because yes, Scratch has those. But I think what he is looking for is more of a way to close the game and load progress later than a checkpoint system.
Offline
MabonBaladevaKain wrote:
I'm NEW to Scratch, so this is both a question and an answer:
Can alterable values of some sort be used online?
Cause if so, you could just make checkpoints throughout the level,
and when you touch the checkpoints, set the alterable values to the current
x and y positions and the current level.
You sure can!
If you open up Scratch, you will notice that the Scratch blocks can be broken down into smaller groups (Motion, Looks, Sound, etc.). One of them is called Variables. You can click on that and choose the option 'Make a variable', which will create a variable block, plus another set of blocks that can be used to change the value of the variable.
Offline
vortex19 wrote:
I think this is the script you're looking for:
<when I receive[ save game
delete "all" on list "save list"
add <x position> to "save list"
add <y position> to "save list"
add <{ Score }> to "save list"
etc.
And when you load the game...
<when I receive[ load game
<set x to( item 1 on "save list" )>
<set y to( item 2 on "save list" )>
<set{ Score }to( item 3 on "save list" )>
etc.
Scratchthatguys wrote:
<when green flag clicked>
<forever>
<if><< mouse touching save <and>and mouse down
<set{savedx }to(<x position>
<set{savedy }to( <y position>
<set{savedd }to( <direction>
<stop script> >>
is my save script, and
<when green flag clicked>
<forever>
<go to xsavedx )y
savedy
<point in direction( savedd
<stop script>
was my load script.
However, this only works offline and if you save the project after you activate the save script.
f the project was to be compiled to an .exe file would the permanent saving work?
Offline
Its acutally possible, and really easy. All you have to do is eliminate anything that says "When Flag pressed, set all variables to 0" because that will restart the game. Instead, make something ingame that allows you to optionally clear your stats if they wont to retry. Then, before you share the project, press the restart.
Offline
murpho wrote:
thank you. and thank you Scratchthatguys i'm working on it right now and i'm so excited to see if it works.
your welcome XD i also made a 3d engine and a few other games that i will add a save and load system. In fact, I may use everyones ideas for my ScratchXP OS. help appreciated!
Offline
So if the topic's closed, should we get a Moderator?
Offline
Topic closed
Pages: 1 2