# Check more than once block

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

When you use the “check once if” block, you could change the amount of times you checked it

#### I’d use it for this type of project:

If there was a variable changing every second, I would check more than once.

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

Variables and numbers and stuff

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

I haven’t

• This is a good idea
• In the middle

0 voters

5 Likes

I think you can use a repeat/repeat forever block for this, but I haven’t tested it yet

3 Likes

Can you? I didn’t realise

2 Likes

Yes you can.

1 Like

How though?

1 Like
6 Likes

It would be helpful, I still think, to have one block to do that.

2 Likes

But that’s the point of the relate block to repeat actions… it’s kind of a waste of tht’s time to do that

7 Likes

Tbh, I don’t really see any use cases for this. It also isn’t a feature present in any language I’ve seen.

5 Likes

Hmm

3 Likes

It might be useful if something changes every second

1 Like

I don’t think it would be, as it would be checking every frame instead of every second. I feel like @GOATGAMES has already come up with a better, more versatile way to do this.

3 Likes

The easiest way is repeat block as it’s litterately the reason it’s there too repeat axtions

2 Likes

And also that image was hard to make

1 Like

you could use a for loop to do it and wait at the end of each iteration

4 Likes

I mean you could do

Repeat forever{
Check once if var = 5{
Change Y by 100;
}
}

3 Likes

You can do:
Game starts
. Repeat (5)
. . Check If (((self) X Position) = (50))
. . . Change Colour
. . End
. End
End

3 Likes

Or you could do this:

``````while(variable == 5){
changeColor()//do smth
waitSeconds(1)
}``````
6 Likes

This isn’t really a necessary idea tbh. It’s a good one but it’s just for convenience. You can just add the repeat times or repeat forever blocks with this.

1 Like