How to save at multiple points? Saving the X, Y, what sprite (custom), and what text it was left off

38 Views Asked by At

I will try my best to explain my problem.

I'm trying to remake DDLC on Scratch and I have a hard time making a code that can save at anytime the user wants. Meaning, if I press S, then I save. I also get a code, and when I enter that code to the load, it will continue off from where I was.

But, how am I suppose to save what sprite the character is, what the X and Y position of the text is, and what text the user left off at. It's hard.

It might make more sense if you looked at the code. Code: https://scratch.mit.edu/projects/911454984/

I tried having multiple tests, but in my mind, the output will never work.

Because (in my understanding), the definition block is a function.

Meaning, once I created it, it will have my own block. I can set my own parameters in it or booleans.

When I do so, it goes to my definition and runs the code.

Think about it more like this:

  • Manager: Responds to the given input
  • Input: Gives whatever value it's inputted.

{ Input | X Position: 55 | Y Position: 60 | }

Input ---> Manager. (The value) Then, for example,

Defining Manager X:(value; does not get affected by the input) Y:(value; does not get affected by the input)

move X by (X Position) move Y by (X Position)

(the X and Y are default codes, I'm just putting the custom block value into them).

So, from that example, how would I make it so that when I enter the code, it will know what X position to go to and Y position, what sprite to change to, and what text to go to?

1

There are 1 best solutions below

0
On

The "save" subsystem is very limited in Scratch. You can use cloud variables only for that.

Please see https://en.scratch-wiki.info/wiki/Saving_Data for details.