A few suggestions regarding conditionals

Today I bring the idea of improved conditionals. One way they could be improved is expanding the use of the and/or blocks. That way you could say

When self is tapped and screen = 1
Do something

This would be used both in the Conditionals and If sections.
Another thing that could be added is If/When contains. Similar to the matches block. It would look something like this:

When self is tapped
Check once if Input contains “Hello world”

This could be used to greatly improve the capabilities of text input. For example, you could easily create a calculator in which a user types in their equation using the save input block.

What do you think?

  • Yes
  • No
  • Accidentally voted

0 voters

7 Likes

yes

3 Likes
3 Likes

why the quote?

3 Likes

Because I believe you said it best

plagiarism is real

4 Likes

We can already use the When ( ) Matches for the Contains block.

2 Likes

These are all very good ideas I think - I would love to see them implemented into Hospcotch!

3 Likes

yes.

2 Likes
3 Likes
1 Like

No matches means the entire thing matches. For example, ok does not match okay. But okay does contain ok. See what I mean?

4 Likes

I think this would work

if “screee” matches “ e “ {
  do code
}
2 Likes

That first suggestion would be amazing. It would’ve made it so much easier to code The Child

1 Like

No, they have to be the same length. It’s only considered a match if:
•It has the same number of characters
•All characters are the same but case doesn’t matter

1 Like

Ok, @QuadraticStudios. Thanks for letting me know!

2 Likes

Isn’t it just this?

1 Like

Input 1=
Hello Worlds

Input 2=
Hello World

Both give the same output…

Here’s the code:

Here’s a link:

2 Likes

this is a pretty nice idea tho
maybe can make some text adventures, or making games or minigames a bit easier to make

2 Likes

I see what you mean. But it’s not quite contains. If you type in “o” for example, it doesn’t work.

3 Likes

so if you do contains “jeg” it would return true if I input “hjjajsjsjemdnehnsg”?

2 Likes