Suggestion: Wait Until and Variable Strings

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

A wait until block Andrea the ability to put text into a variable.

I’d use it for this type of project:

Lots of different projects

Here are some examples of Hopscotch code that could be improved if we had this:

With the variable suggestion: My old OMIER project would be a lot simpler, and it would be very useful with keyboards.
Wait until suggestion: I can’t think of something right now, but I wanted to use this in a project when I was making it, but couldn’t.

Here is an example design I’ve made:

A wait until block would look just like a “Wait ___ Milliseconds” block but instead it would say “Wait until ___”.

I’ve seen something similar in another programming languages, it looks like this:

I think scratch has a “Wait until” block, and most programming languages allow you to put strings in variables.

17 Likes

I edited the title for more info and fixed a spelling error;)

The wait until has been talked about, as with the text variables. I would like to see them both implemented

8 Likes

Cool! This would be really nice to have.

3 Likes

Yep, Scratch has both of those.

The only problems would be with the “Increase value” blocks, but I know how it will work anyway since Scratch has that too and I’ve experimented with it.

3 Likes

how? :man_facepalming:

It literally observes changes in values

3 Likes

Interesting :clap:.
Really nice to have it at Hopscotch.

2 Likes

Increase variable on a string could just be the same as setting it to existing + new

1 Like

Currently Hopscotch doesn’t have a “wait until” block, but a way to do this without a preset block is by using a custom block (let’s call it “waitUntil”) with the following code:

If(testStatementVar !== wantedState){
waitUntil()
}

//Written in Javascript

But hopefully THT will add a “wait until” block soon.

1 Like

I know you can do this, but it would be a lot easier and faster with a wait until block.

That is True.

There is actually a way to do string variables. Just type some text in any app, copy it and paste it into the variable. Here’s an example:

image
Hope this helped :slight_smile: .

3 Likes

It gets stored as zero though; any string equals another.

Try “if ‘abc’ = ‘def’ then set color to red” and it will be red.

4 Likes

Ok, thanks!

2 Likes

It could look like this maybe:

2 Likes

Indeed. But remember, it’s take lots of design first

3 Likes