I'm trying to make a game called Monster Mayhem where you capture monsters and travel to different locations - Sort of like Collab Monsters by Archmage - I'm really trying hard to make the game. But there is one problem. I want the game to save when you click a save button. I know it has to do with a script with a list but can aybody help me on this? I'm just an advanced programmer...
Offline
How much does it need to save? Just the score, or the coordinates of each sprite?
Offline
If you want it to save within the game (so if you close the project without saving the save will still be lost), you should have a script starting with "When save clicked". You then use the "delete [all] of list [save data]" block to clear any previous data stored there. After that, use the "add [thing] to list [save data]" block to add lines of code. so you can do things like
when save clicked:
add [(score)] to [save data]
add [(lives)] to [save data]
add [([x-position] of [player])] to [save data]
dad [([y-position of [player])] to [save data]
and so on. When the game loads a similar script can then be used:
when I recieve [load game]:
set [score] to [(item(1)of[save data])]
set [lives] to [(item(2)of[save data])]
set x position to ((item(3)of[save data]) )
set y position to ((item(4)of[save data]) )
Last edited by sparks (2011-04-20 13:55:51)
Offline
sparks wrote:
If you want it to save within the game (so if you close the project without saving the save will still be lost), you should have a script starting with "When save clicked". You then use the "delete [all] of list [save data]" block to clear any previous data stored there. After that, use the "add [thing] to list [save data]" block to add lines of code. so you can do things like
when save clicked:
add [(score)] to [save data]
add [(lives)] to [save data]
add [([x-position] of [player])] to [save data]
dad [([y-position of [player])] to [save data]
and so on. When the game loads a similar script can then be used:
when I recieve [load game]:
set [score] to [(item(1)of[save data])]
set [lives] to [(item(2)of[save data])]
set x position to ((item(3)of[save data]) )
set y position to ((item(4)of[save data]) )
![]()
Offline
That's what I was trying to find out.<point towards( <move( )steps><move( )steps><move( )steps><move( )steps><move( )steps><move( )steps>
Offline
scimonster wrote:
sparks wrote:
If you want it to save within the game (so if you close the project without saving the save will still be lost), you should have a script starting with "When save clicked". You then use the "delete [all] of list [save data]" block to clear any previous data stored there. After that, use the "add [thing] to list [save data]" block to add lines of code. so you can do things like
when save clicked:
add [(score)] to [save data]
add [(lives)] to [save data]
add [([x-position] of [player])] to [save data]
dad [([y-position of [player])] to [save data]
and so on. When the game loads a similar script can then be used:
when I recieve [load game]:
set [score] to [(item(1)of[save data])]
set [lives] to [(item(2)of[save data])]
set x position to ((item(3)of[save data]) )
set y position to ((item(4)of[save data]) )
![]()
![]()
![]()
Sci I'm all for you pointing out spelling mistakes in official posts, that's good, and even if you're also commenting on the above post in a way that helpfully adds to it. This however is just plain annoying because you're not contributing to the conversation on the thread and don't really make the advice I give sound as sound as it otherwise might have, which just makes everyone look stupid. Please try to keep posts like this at least contributory.
@arceus4100, does that mean your problem is solved?
Offline
sparks wrote:
scimonster wrote:
sparks wrote:
If you want it to save within the game (so if you close the project without saving the save will still be lost), you should have a script starting with "When save clicked". You then use the "delete [all] of list [save data]" block to clear any previous data stored there. After that, use the "add [thing] to list [save data]" block to add lines of code. so you can do things like
when save clicked:
add [(score)] to [save data]
add [(lives)] to [save data]
add [([x-position] of [player])] to [save data]
dad [([y-position of [player])] to [save data]
and so on. When the game loads a similar script can then be used:
when I recieve [load game]:
set [score] to [(item(1)of[save data])]
set [lives] to [(item(2)of[save data])]
set x position to ((item(3)of[save data]) )
set y position to ((item(4)of[save data]) )
![]()
![]()
![]()
Sci I'm all for you pointing out spelling mistakes in official posts, that's good, and even if you're also commenting on the above post in a way that helpfully adds to it. This however is just plain annoying because you're not contributing to the conversation on the thread and don't really make the advice I give sound as sound as it otherwise might have, which just makes everyone look stupid. Please try to keep posts like this at least contributory.
![]()
@arceus4100, does that mean your problem is solved?
OK, I'm sorry.
I'll keep my posts out of misc worthwhile.
Last edited by scimonster (2011-05-13 00:19:48)
Offline
Yeah, most languages, have hundreds of little features and functions. Scratch has less than 100 but it has all the most important features. One feature that was left out was creating save data (scratch v2 may provide this though). So even in my game Collab Monsters, the save button doesn't save, it just prepares the project to be saved when downloaded.
Your options are:
-make a password system to unlock specific parts of the game
-Make it so that saving works when downloaded and a save button readies the project for saving
Offline
Lulz... I just invented a way, thnx anyways xD
Offline
Lulz... I just invented a way, thnx anyways xD
How?

Offline
I never paid attention to the forums so I just downloaded some other projects, stealing their copy device xD
Offline
I don't think its possible, or well, at least not easily.
Offline
hello elim here me saying its extremely possible to make a save script but it involves a save code like it asks what the load code type it in and if its the level code it changes the level!
Offline