Pages: 1
Topic closed
MASSIVE. BREAKTHROUGH. OK, this script takes a while to replicate, but it allows a ACTUAL SAVE SCRIPT. The forum blocks don't have the neccesary parts, but I'll tell you how to make a save script.
OK, first of all, for an RPG, it's like this:
You have these variables: EXP, LVL and Coins. Make a list called "Save Code". Hide it. Now, make a sprite. Don't worry what it looks like. Just make it do this:
when "Sprite1" clicked
ask "Hmm? What do you need?" and wait
Now, I'm too lazy to type this part, but you need to connect:
if letter 1 of answer = s and letter 2 of answer = a and letter 3 of answer = v and letter 4 of answer =e
broadcast "Save Code"
say "OK, I'm calculating your code..." for 5 seconds
Now, stop the work on this sprite for a bit and save the project.
Click on the Stage and create this script:
when I recieve "Save Code"
if Coins>99
insert "a" into "Save Code"
else
if Coins>199
insert "b" into "Save Code"
if EXP>99
insert "d" into "Save Code"
else
if EXP>199
insert "g" into "Save Code"
if LVL>4
insert "r" into "Save Code"
else
if LVL>9
insert "y" into "Save Code"
That's a simplified version. Save the project again.
Now, go back to the sprite we worked on earlier. Time for the load code. First of all, check what's in the "Save Code" list. It may have inserted all of the above letters, so this may need some fixing.
Now, just add this simple script below the "OK, I'm calculating your code..." speech script.
say [join (Heres your code: (Save Code)]
I'll update this later.
Offline
the easier way is to just to make none of the variables reset themselves, that way when somebody saves the project they keep all of their levels.
Offline
I hate using lame workarounds like this just for scratch. Cookies would be a nice solution to this problem.
Offline
archmage wrote:
I hate using lame workarounds like this just for scratch. Cookies would be a nice solution to this problem.
... Sheesh, Archy, don't have to be so angry. I was just happy about me actually having a good idea.
Offline
He's just saying that scratch could use cookies as a solution to the save problem. He's not mad at you.
Offline
steppenwulf wrote:
He's just saying that scratch could use cookies as a solution to the save problem. He's not mad at you.
Oh.
Offline
Topic closed
Pages: 1