When is not matching, new idea

So then why is the “matches” and other stuff there?

1 Like

Matches is more “contains”

ABC matches B → true

And it works with regular expressions but that’s a whole different story

1 Like

Aaahhh ok I get it

1 Like

Matches allows you to use regular expressions, so it’s more similar to checking if it contains something than equals something.

4 Likes

Isn’t this when () doesn’t equals ()
Eh can’t explain

No, because this can use regular expressions, similar to what I want with In string, replace something with something but it just checks if it does not match something instead of replacing what it does match, if anything.

1 Like

This could work with both when message doesn’t match (the opposite of when message matches) and when I don’t get message (opposite of when I get message) I think both would be pretty useful, cool idea.

Why can’t you just use when game is playing and pause it for a frame when you get a message? Or with In string, replace something with something you might be able to create your own message system which would make that easier.

2 Likes

You could but just having the block would make it much easier

1 Like

This block would be useful

Great idea - it would be very useful to have in Hopscotch.

You confuse me? I don’t understand

Hmm…

Isn’t that why check if else exists?

Or is it a rule rather than a block?

Unfortunately, this doesn’t exist yet.

Fortunately, you can use JSON editing and drop a conditional into a conditional.

If ( ("test" matches "t") == 0 ) {
  //Do something
}

The code above is the equivalent of “test” does not match “t”

3 Likes

Bumpity bump

2 Likes

Yoink
Do we need this

1 Like

Maybe:
Repeat forever{
Check if ((hi) matches (h)){
// nothing here
}else{
// some code here
}end if
}end repeat

Bruh that’s big brain JSON editing there

Oh, matches (0) i thought matches ( )

it basically means if (“that” == “t”) is false { code }

1 Like

Can’t you basically just do

 when ___ doesn’t equal ____