Discuss Scratch

Baselira
Scratcher
15 posts

How to Make a Simple Login/Save Feature?

I already have the account creation feature and Im able to login, and now that i have access to could data how can I make a login feature that can save your progress and once you log back in you come back to where you left off?
HardClaw57
Scratcher
500+ posts

How to Make a Simple Login/Save Feature?

Make checkpoints and a variable that changes based on which checkpoint you're at. Then, use a script to check what is in the checkpoints variable and load from the checkpoint that corresponds to the variable state. You will need to use variables/broadcasts that access the checkpoint from the account login OR from the last checkpoint.

hai
Baselira
Scratcher
15 posts

How to Make a Simple Login/Save Feature?

HardClaw57 wrote:

Make checkpoints and a variable that changes based on which checkpoint you're at. Then, use a script to check what is in the checkpoints variable and load from the checkpoint that corresponds to the variable state. You will need to use variables/broadcasts that access the checkpoint from the account login OR from the last checkpoint.
:0

this made no sense

XD im ded

So you make like a point/sprite on a certain area of the stage that has its own variable such as Checkpoint and thats all I understood? D:
OrionDark7
Scratcher
26 posts

How to Make a Simple Login/Save Feature?

Well, you could make something like this:

To Save:
add (cloud data) to [data v]
say (join [Your ID is ](length of [data v])) for (2) secs // this shows the most current save, which would be the users save.

To login:
ask [Enter your ID:] and wait
set [load data v] to (item (answer) of [data v]) // fetches data from cloud

From there, you can access the data

OrionDark7

Check out my newest game, Road Rage, here!
Baselira
Scratcher
15 posts

How to Make a Simple Login/Save Feature?

OrionDark7 wrote:

Well, you could make something like this:

To Save:
add (cloud data) to [data v]
say (join [Your ID is ](length of [data v])) for (2) secs // this shows the most current save, which would be the users save.

To login:
ask [Enter your ID:] and wait
set [load data v] to (item (answer) of [data v]) // fetches data from cloud

From there, you can access the data

By data you mean username and password in lists? Becuase instead of data I had if you clicked New and created an account it saved the registered username is list Username and the password in list Password, so would I have to only use 1 or would it already have it sorted out? And for enter ID could i repeat that for the enter username and enter password blocks?

Or would i have to give them a code and automatically add it to the list?

Last edited by Baselira (Oct. 3, 2015 15:58:40)

Baselira
Scratcher
15 posts

How to Make a Simple Login/Save Feature?

Baselira wrote:

OrionDark7 wrote:

Well, you could make something like this:

To Save:
add (cloud data) to [data v]
say (join [Your ID is ](length of [data v])) for (2) secs // this shows the most current save, which would be the users save.

To login:
ask [Enter your ID:] and wait
set [load data v] to (item (answer) of [data v]) // fetches data from cloud

From there, you can access the data

By data you mean username and password in lists? Becuase instead of data I had if you clicked New and created an account it saved the registered username is list Username and the password in list Password, so would I have to only use 1 or would it already have it sorted out? And for enter ID could i repeat that for the enter username and enter password blocks?

Or would i have to give them a code and automatically add it to the list?
Welp I fixed some things but now it only lets 1 user ID save, how do I fix this to allow for more than 1 user ID to be user-saved?
deck26
Scratcher
1000+ posts

How to Make a Simple Login/Save Feature?

You need to be able to save data which the project can use to put a user back to the position they'd reached. This will vary by project but you should be able to work out what you need to save. Then you need something to save data for each username. My project may help. https://scratch.mit.edu/projects/73630038/
Baselira
Scratcher
15 posts

How to Make a Simple Login/Save Feature?

deck26 wrote:

You need to be able to save data which the project can use to put a user back to the position they'd reached. This will vary by project but you should be able to work out what you need to save. Then you need something to save data for each username. My project may help. https://scratch.mit.edu/projects/73630038/
I looked and its a good script, but when you reload it doesnt save the value of Baselira/username, and thats what I'm trying to achieve, but that would be a good start, thank you c:
deck26
Scratcher
1000+ posts

How to Make a Simple Login/Save Feature?

I don't understand what you mean. It's a project that gives you everything you need to save a numeric string related to a Scratch username. In what way is that not what you were after?
INSANITYKID101
Scratcher
24 posts

How to Make a Simple Login/Save Feature?

Local saving is not possible yet.
Online saving is possible when the Cloud Lists come out.
I'm REALLY looking forward to the Cloud Lists.

█████░███░░░░███░░░█░░░░███░░░░█░░│Hello. I am a very weird Scratcher who likes Unicode art.
░░█░░░░█░░░░░█░░░░██░░░█░░░█░░██░░│I can enter these special characters without
░░█░░░░█░░░░█░░░░█░█░░░█░░░█░█░█░░│copy/pasting from other texts. The picture is a trombone.
░░█░░░░█░░░█░░░░░░░█░░░█░░░█░░░█░░│░░░░░░░░░░░░░█
░░█░░░░█░░█░░░░░░░░█░░░█░░░█░░░█░░│░█████████████
░░█░░░░█░█░█░░░░░░░█░░░█░░░█░░░█░░│█░░█░░░░█░░░░█
░░█░░░░██░░░█░░░░░░█░░░█░░░█░░░█░░│░██████████
░░█░░░░█░░░░░█░░░░░█░░░█░░░█░░░█░░│░░░░█░░░░░░█
█████░███░░░░███░█████░░███░░█████│▓██████████
MrVillager
Scratcher
1 post

How to Make a Simple Login/Save Feature?

OrionDark7 wrote:

Well, you could make something like this:

To Save:
add (cloud data) to [data v]
say (join [Your ID is ](length of [data v])) for (2) secs // this shows the most current save, which would be the users save.

To login:
ask [Enter your ID:] and wait
set [load data v] to (item (answer) of [data v]) // fetches data from cloud

From there, you can access the data

how do you even get those red blocks?!!?
deck26
Scratcher
1000+ posts

How to Make a Simple Login/Save Feature?

MrVillager wrote:

OrionDark7 wrote:

Well, you could make something like this:

To Save:
add (cloud data) to [data v]
say (join [Your ID is ](length of [data v])) for (2) secs // this shows the most current save, which would be the users save.

To login:
ask [Enter your ID:] and wait
set [load data v] to (item (answer) of [data v]) // fetches data from cloud

From there, you can access the data

how do you even get those red blocks?!!?
You seem to think cloud lists exist - they don't. Any cloud list project emulates the list by saving encoded data to the cloud and extracting it as required.
Bluepaw088
Scratcher
21 posts

How to Make a Simple Login/Save Feature?

Hi, this is related, I don't want a log in feature in my project, but what about save features? How do I do that? No offence, it's kinda confusing.
deck26
Scratcher
1000+ posts

How to Make a Simple Login/Save Feature?

Bluepaw088 wrote:

Hi, this is related, I don't want a log in feature in my project, but what about save features? How do I do that? No offence, it's kinda confusing.
If you need help and can't find a recent post on the subject (this does crop up regularly) start your own new topic rather than necroposting please.

Cloud variables are fairly limited now - max 128 digits each - so the amount you can encode is limited. A code you can cut and save is potentially better.
hp7ego
Scratcher
7 posts

How to Make a Simple Login/Save Feature?

move () steps
move (5) steps
theanonymousweirdo
Scratcher
500+ posts

How to Make a Simple Login/Save Feature?

Please don't post on old topics

This is my signature. It appears at the bottom of all of my posts.
My favorite song: You're Not Alone
hp7ego
Scratcher
7 posts

How to Make a Simple Login/Save Feature?

deck26 wrote:

MrVillager wrote:

OrionDark7 wrote:

Well, you could make something like this:

To Save:
add (cloud data) to [data v]
say (join [Your ID is ](length of [data v])) for (2) secs // this shows the most current save, which would be the users save.

To login:
ask [Enter your ID:] and wait
set [load data v] to (item (answer) of [data v]) // fetches data from cloud

From there, you can access the data

how do you even get those red blocks?!!?
You seem to think cloud lists exist - they don't. Any cloud list project emulates the list by saving encoded data to the cloud and extracting it as required.
Cloud lists exist.
Nyan_lol765
Scratcher
8 posts

How to Make a Simple Login/Save Feature?

i have no idea

Nyan_lol765
Scratcher
8 posts

How to Make a Simple Login/Save Feature?

i have no idea

Nyan_lol765
Scratcher
8 posts

How to Make a Simple Login/Save Feature?

sorry 4 posting twice.







play sound [ v]

Powered by DjangoBB