I need answers! My name is Jojorocks 254 and I want to know what script you use to save a game. i am making an aquarium game! please visit my gallery!
Offline
I don't think there is a script to save your game. When you save your game in a non-scratch game, a whole new folder gets created to store all the data from your saved game, and to my knowledge, scratch can't do that with scripts.
Offline
Actually, it is possible, but it requires you to know how to use variables, but since you are a new scratcher, you should start off a bit easier. If you know how to use variables, then I'll help you out.
Offline
DJTHED wrote:
Actually, it is possible, but it requires you to know how to use variables, but since you are a new scratcher, you should start off a bit easier. If you know how to use variables, then I'll help you out.
i so need your help can you help me with the saving games.
Offline
pen13 wrote:
i so need your help can you help me with the saving games.
OK, I will see if I can make a tutorial on how to save games, if you can keep an eye on my account, soon there will be a tutorial on how to. OK?
Offline
it is possible, but players must download for "save and come back later."
say you have "coins" on your game. make sure that when flag is clicked, it DOES NOT set "coins" to 0. then, if you click the green flag again, you will still have the same amount of "coins."
so you get 10 "coins" on your game for example. your "coins" variable is 10. now, you want to upload your project? WAIT! you must set "coins" to 0 before uploading. (go to "variables" tab, click "set "coins" to 0."
now, when people download your project, they can play again and again without losing their "coins."
Offline
jonzo wrote:
it is possible, but players must download for "save and come back later."
say you have "coins" on your game. make sure that when flag is clicked, it DOES NOT set "coins" to 0. then, if you click the green flag again, you will still have the same amount of "coins."
so you get 10 "coins" on your game for example. your "coins" variable is 10. now, you want to upload your project? WAIT! you must set "coins" to 0 before uploading. (go to "variables" tab, click "set "coins" to 0."
now, when people download your project, they can play again and again without losing their "coins."
That's one way, but just remember you'll have to save the project before exiting Scratch, or it won't save the variables.
You could also do it with lists. You could add every variable you want to save to a list, then save. When you open the game again, it would use the items in the list to reset the variables the way they were.
There's even another way you can "save" using lists. If you show the list on the stage, right-click it, and then press "export", you can save the list as a text file. When you load the project again, just select "import..." and you can load the list again!
So, there's a few ways you can save using Scratch. It would be way easier if there were saving blocks, but it's possible even without them.
Offline
Here's an example of saving with variables: http://scratch.mit.edu/projects/Nitezscratch/582079
Offline
Yes you can, first of all you will need some vars. and lists to track information.
Instead of having it set levels at the start of the script, before you upload you set all vars. and lists to thier start points without adding them to the script, you can do this by double clicking the block and setting what you whant in it. Then when someone plays online they will start at one and next time they play they will have a saved game heres how it should work:
<when green flag clicked><switch to costume[ <{ Level}><broadcast[ Play]>
Before you uplo0ad double click this to reset the game without adding it to the script.
<set{Level }to( 1)>
Offline
It is possible if you know how to use variables (ex. 08jackt makes the game save if your at a checkpoint if you are on the same page, it won't work if you refresh the page)
Offline
Currently there is no possible way to save a game online but if the users download the game it is possible. Other programs that allow you to save (Flash, etc.) use cookies. Sadly cookies are not possible in Scratch.
Offline
i think you could do something to save the game... I'm not sure, ,and I don't think it would work online. But it would require using variables, and I'd have to think about it for a while...
thezofie1
Offline
hey, i made a clock script, and its really neat, you can exit to the menu of the script and go back and it will go, but if i close scratch when i come back, it didnt continue, is there any way to do that?
Offline
digikids wrote:
I don't think there is a script to save your game. When you save your game in a non-scratch game, a whole new folder gets created to store all the data from your saved game, and to my knowledge, scratch can't do that with scripts.
actully it is possible! you give the game a code and it loads in a "code" form it is just a tutorial and all but you can put it in any game! here it is: http://scratch.mit.edu/projects/noah279878582/1509039
check it out!!
Offline
creat0r wrote:
hey, i made a clock script, and its really neat, you can exit to the menu of the script and go back and it will go, but if i close scratch when i come back, it didnt continue, is there any way to do that?
actully it is possible! you give the game a code and it loads in a "code" form it is just a tutorial and all but you can put it in any game! here it is: http://scratch.mit.edu/projects/noah279878582/1509039
Offline
thezofie1 wrote:
i think you could do something to save the game... I'm not sure, ,and I don't think it would work online. But it would require using variables, and I'd have to think about it for a while...
thezofie1
well, todays ur lucky day!! you dont have to think about it! i made a saving script that you can leave and comeback and load it up again you could save and come back 100000000000000000000 years later and still work so, actully it is possible! you give the game a code and it loads in a "code" form it is just a tutorial and all but you can put it in any game! here it is: http://scratch.mit.edu/projects/noah279878582/1509039
Offline
Thehero wrote:
It is possible if you know how to use variables (ex. 08jackt makes the game save if your at a checkpoint if you are on the same page, it won't work if you refresh the page)
this game you CAN save the game! even if you refresh the page!!!!! so, actully it is possible! you give the game a code and it loads in a "code" form it is just a tutorial and all but you can put it in any game! here it is: http://scratch.mit.edu/projects/noah279878582/1509039
Offline
recycle49 wrote:
Yes you can, first of all you will need some vars. and lists to track information.
Instead of having it set levels at the start of the script, before you upload you set all vars. and lists to thier start points without adding them to the script, you can do this by double clicking the block and setting what you whant in it. Then when someone plays online they will start at one and next time they play they will have a saved game heres how it should work:
<when green flag clicked><switch to costume[ <{ Level}><broadcast[ Play]>
Before you uplo0ad double click this to reset the game without adding it to the script.
<set{Level }to( 1)>
well i did it!! i did it before i saw this message, and i did not understand what you meant, and i did it a different way all together, but here it is....... so, actully it is possible! you give the game a code and it loads in a "code" form it is just a tutorial and all but you can put it in any game! here it is: http://scratch.mit.edu/projects/noah279878582/1509039
Offline
hmnwilson wrote:
jonzo wrote:
it is possible, but players must download for "save and come back later."
say you have "coins" on your game. make sure that when flag is clicked, it DOES NOT set "coins" to 0. then, if you click the green flag again, you will still have the same amount of "coins."
so you get 10 "coins" on your game for example. your "coins" variable is 10. now, you want to upload your project? WAIT! you must set "coins" to 0 before uploading. (go to "variables" tab, click "set "coins" to 0."
now, when people download your project, they can play again and again without losing their "coins."That's one way, but just remember you'll have to save the project before exiting Scratch, or it won't save the variables.
You could also do it with lists. You could add every variable you want to save to a list, then save. When you open the game again, it would use the items in the list to reset the variables the way they were.
There's even another way you can "save" using lists. If you show the list on the stage, right-click it, and then press "export", you can save the list as a text file. When you load the project again, just select "import..." and you can load the list again!
So, there's a few ways you can save using Scratch. It would be way easier if there were saving blocks, but it's possible even without them.
well, >.> you could save the whole thing in a variable or a list (but i think variable is easier) and you could just say <get 3rd letter in *saving code* (* = variable*) and get 4th letter and then so when you put in the code, it finds the letters out of the code to set as the different variables such as "strength". and then <find 3rd letter of *saving code* and set 3rd letter which may be *5* and set it as the variable of "strength>
so, in therie, actully it is possible! you give the game a code and it loads in a "code" form it is just a tutorial and all but you can put it in any game! here it is: http://scratch.mit.edu/projects/noah279878582/1509039
Offline
pen13 wrote:
DJTHED wrote:
Actually, it is possible, but it requires you to know how to use variables, but since you are a new scratcher, you should start off a bit easier. If you know how to use variables, then I'll help you out.
i so need your help can you help me with the saving games.
i can help!!! so, actully it is possible! you give the game a code and it loads in a "code" form it is just a tutorial and all but you can put it in any game! here it is: http://scratch.mit.edu/projects/noah279878582/1509039
Offline
Do you want to save the game or variables because a lot of people are talking about variables on here. To save your game, go to the corner and click file, save as. Then you can save yor game to any place on your computer! Hope this helps
Offline