Variable with the username of the current player

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

A variable like last touch x which has the username of the current player

I’d use it for this type of project:

Creating things based on the username, projects where the world is generated based on username so that it’s the same every time you play it but different for everyone

17 Likes

I don’t get it.

2 Likes

What do you mean? What don’t you get?

6 Likes

Interesting, I like it

1 Like

Oof i get it now lol

Like, it’s username specific?

2 Likes

This could be used in some games where u have a username, it could mimic your HS one

1 Like

It’s a variable which is your username. So if I played it for example, it would be Petrichor (ish) and if awesome e played it would be Awesome_E

6 Likes

Ok thanks

Cool idea

2 Likes

That’s cool!

2 Likes

But what would it return in the webplayer?

3 Likes

Empty string for text or 0 for a variable, same as empty text object probably.

3 Likes

maybe it could return “anonymous user”

2 Likes

This is an amazing idea and has made me think of something. Hopscotch needs to add a feature that can return variables within strings of text, for example:

 Set Text (This is text (Variable Block) This is text) 

It is inconvenient to use three different text blocks, especially when the number gets too big (1).

1

It could appear on the editor as: (2)

2

And would show up as a single string of text, such as: (3)

3



Further Reading

There are some details I have added in the second photo that need to be discussed.

  1. Every time a Set Text box is made and some text is defined, another box will show up beside it, on the right.

  2. A new block will need to be made if the variable is some text, which is a variable block for text. These blocks are different from the numerical value blocks since they cannot be used with the Set and Increase blocks.

I’m sure I have missed some things, so please tell me. Thanks for reading!

4 Likes

actually this is in the beta editor I think

1 Like

You can use the add operator [math block] with strings in the beta editor

3 Likes

@Nobody @Awesome_E That’s awesome it’s in beta! I didn’t think of adding strings together, that would be a good idea too

3 Likes

I didn’t know that! Wow, cool. And the idea referenced in the OP is cool too.

4 Likes

Beta…

2 Likes

This would be fabulous.
Making Hopscotch server friendly is smart.

I agree with the Persisting User Data Plan


So then we can check if your current project has ‘n plays’ or ‘isFeatures()’
Suuper cool!!

6 Likes