User variables- suggestion

A feature I’d like to see in Hopscotch is: user variables

I’d use it for this type of project:

For machine learning projects, save function per user

Here are some examples of Hopscotch code that could be improved if we had this: making machine learning much easier, as saving data will be easier and won’t need to be changed manually in code

Here is an example design I’ve made: haven’t drawn anything up, but in the object variables, you would be able to change the (self) prefix to (user) attached the the variable. You wouldn’t be able to change which username, making chatting not possible through it.

I’ve seen something similar in another programming languages, it looks like this: cloud variables would be somewhat like it, except scaled back to per user. Scratch also has a username function, which could be Jimmy rigged to work like this.

####How it would work: in a users files there would an extra JSON file that would have something structured like this:
Project id=whatevertheidis
Varable 1 = value
Variable 2 = value
You then would repeat per project and variables in it
Hmmm should I tag?
I guess I will. @Ana and I guess @omtl cause it’s important


Ok. Nice idea. Yes. Very nice. :clap:

Note: First like + non-creator post


Sounds like a very nice idea to me!


This sounds like a good idea! Go mindcoolio!

I third this idea!


I’d love to say goodbye to savecodes. This is a great idea.


Would love to see variables that are in a ‘save state’. That is the most wanted thing on my list. If you can’t save people’s progress, what’s the point of making a game that doesn’t save? Also, a “reset progress” block would be required so people could reset their progress.
(The way this stuff could be applied could make Hopscotch the best app for Tablets and Phones… again!)
Here’s an image to illustrate this:


Reset progress would be easy, just set all variables to 0

Ah but what about another users progress? The variable would have to be server based in order to remove someone’s variable data specifically for their data.
The following text is just for understanding how it would execute in the editor (it is not how a real coder would implement it and Hopscotch’s JSON format doesn’t work this way):
#when a new player presses an object button that saves their progress#

when [“objectID” = “3D27-AB62-HJA1-OP24”, “name” = “Save Button”] is tapped { then execute “save_progress” to [“PlayerID” = “current_playerid”]}
#when a returning player comes to play again#
when game starts execute “load_data”,
If “current_playerid” = “catz123”, then “load_data” of [“PlayerID” = “catz123”],

Note! Hopscotch would need to make a server spot for the player data, Or they could locally store each project’s variables on the person’s device. If the player deleted the data, it would reflect on the project.


Ya locally is probably THTs best bet of they where to implement it.


Great idea! Variables that could sense your username could improve lots of projects! I haven’t seen an idea this genius! Great idea!


Thanks :3 I hope it is considered

1 Like

Great idea mindcool!! I second this idea, I’d love to see it implemented


Thanks:) it would make so many thing easier


I really like this idea!
Hopscotch would really be improved with it!

1 Like

I fourth this idea!


coolio idea

1 Like

Really cool idea!