Resources on Variables in Hopscotch and Local Variables

Looking for resources on local variables, or on variables in general? We’ve got you covered.

Video

Articles

Here are our articles documenting Variables in Hopscotch, and Local Variables.

Variables in Hopscotch

This article contains information on the different types of variables in Hopscotch. Here is what it covers:

  • What is a variable?
  • What is scope?
  • What is a declaration?
  • What are the different types of variables in Hopscotch?
    • Game variables
    • User variables
    • Object variables
    • Local variables

Local Variables

Local variables are variables that exist within a specific container. You can choose which container they exist in, by changing where the variable is declared.

This article contains information on

  • Creating/Using Local Variables
  • Setting the Scope of Local Variables
  • Changing the Scope of Local Variables
  • Merging Local Variables

This post will be updated with more resources as they become available.

If you have any questions or tips, feel free to post them below. Also feel free to share constructive feedback or corrections for the resources.

10 Likes

Cool article

4 Likes

This is very useful! Thanks!

Second post

2 Likes

We have a new video on how to use local variables:

@omtl

Feel free to post here if you have any questions or constructive feedback. The video will also be updated when there are parameters for custom blocks.

16 Likes

I commented on the video on how great it is, but I’ll say it again. It’s a great tutorial. It’s very informative and simple to understand.

Also, I can’t wait for custom blocks to get an upgrade with parameters.

I’ll be curious to know what the limit for the amount of parameters per custom block will be, and what input type(s) that parameters will support (i.e., integer, float, string, etc.)

3 Likes

will custom blocks able to return values too?

3 Likes

Not for the next main update, though it is something that we’d like to add in future.

2 Likes

Will the next main update run on player 1.6.x or will it still run on player 1.5.x?

1 Like

I’ll have to get back to you on that.

The input types will be the same as what regular variables can be set to
And you’ll be able to set multiple parameters per custom block (not sure of a hard limit yet)

2 Likes

Oh, cool. I guess it’ll also interesting to know how custom blocks w/ parameters will be ran (unless it’ll run the same way as the current custom blocks (abilities) do).

1 Like

Ok the next update will run on web player 1.6

1 Like

Ok. That will be even more interesting. I’ll have to try everything out once the time comes.

So who updates the Official HS Language Roadmap on Airtable when needed, and how often do they update it? Just curious, that’s all…

1 Like

Yeah sorry for the confusion — currently that Airtable is not being updated and we’re not really using that internally right now. I’m a bit unsure since that was used before I started here and former product manager has left. (We do have quarterly roadmap planning and weekly planning but it’s not listed anywhere public.) Though the list on the Airtable is actually a pretty good indicator of what we are working towards.

We will post in #announcements when features are released.

3 Likes

Got it…