Discuss Scratch
- Discussion Forums
- » Suggestions
- » A boolean block that scans if a thing has atleast 1 thing that is in a list.
- _RareScratch_
-
23 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Hi. My 2nd suggestion! Today i would love if you added this block.
Here is why.
1. It would be useful to have this, since it compresses a huge script into 1 simple thing
2. Having this block could also save over 50+ operating blocks if the length is over 25. Here is a example.
Before:
After (with the suggestion):
It will be located inbetween:
Both of these blocks have the suggestion block im talking about inbetween those. It would formerly be closest to
That is all I can describe about the block. Have a nice time!
list contains atleast [1 v] thing/s in [list v] ?
Here is why.
1. It would be useful to have this, since it compresses a huge script into 1 simple thing
2. Having this block could also save over 50+ operating blocks if the length is over 25. Here is a example.
Before:
when green flag clicked
add [a] to [before v]
add [b] to [before v]
say (<(before) contains [b] ?> and <(before) contains [a] ?>) for (2) secs
After (with the suggestion):
when green flag clickedThose are the 2 reasons why.
add [a] to [after v]
add [b] to [after v]
list contains atleast [2 v] thing/s in [after v] ?
It will be located inbetween:
<[list v] contains [thing] ?>and
show list [list v]
Both of these blocks have the suggestion block im talking about inbetween those. It would formerly be closest to
<[letters v] contains [thing]?>too for a idea.
That is all I can describe about the block. Have a nice time!
- HTML-Fan
-
1000+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
What about
<not<(length of [list v] :: list) < (min :: grey)>>
- _RareScratch_
-
23 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
<not<(length of [list v] :: list) < (min :: grey)>>A bit too complicated.
Make a bigger version of it and more understandable please.
- HTML-Fan
-
1000+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
If you want to know if a list has at least a certain length, then that's your easy workaround.
- BosenChang
-
1000+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
I think you should correct it…
Anyways, support!
<list contains at least () things in [after v] ?:: list>Also, these are not called “booleans,” they are called “predicates,” if you know what I mean.
Anyways, support!
Last edited by BosenChang (July 15, 2020 15:57:41)
- HTML-Fan
-
1000+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
But if you want to check if something has at least a certain item number, just use the length and compare!
- HighFlyer222
-
100+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Try this! Not by me but it is a great project.I think you wanted a signature, the thing people have under their posts. To have one, go to Discussion Home and scroll down until you see “Change your signature” click it, write your signature and press “Submit”. Bam.forever
imagine
fun
projects
end
Stay safe!
Signatures are seen under a light gray line on every post you make, like under this line V
- _RareScratch_
-
23 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
kkTry this! Not by me but it is a great project.I think you wanted a signature, the thing people have under their posts. To have one, go to Discussion Home and scroll down until you see “Change your signature” click it, write your signature and press “Submit”. Bam.forever
imagine
fun
projects
end
Stay safe!
Signatures are seen under a light gray line on every post you make, like under this line V
- scratchykit5743
-
1000+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
i was thinking about a variation of this earlier: a boolean that detects how many of a certain item is in a list!
anyways, your Og suggestion, no support, but a variation could work.
anyways, your Og suggestion, no support, but a variation could work.
- LilGloGlo_76
-
100 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Maybe
Might work.
I'm not sure if I did the forum blocks right though.
<[List v] contains [((thing) * (2))] ?>
Might work.
I'm not sure if I did the forum blocks right though.
- HTML-Fan
-
1000+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Just delete the ] and [. No, that won't work.
- LilGloGlo_76
-
100 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Maybe<[List v] contains [((thing) * (2))] ?>
Might work.
I'm not sure if I did the forum blocks right though.
Replace the “(thing) * (2))” with an operator.
- BosenChang
-
1000+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Maybe
*correction made by @BosenChang*<[list v] contains ((thing) * (2)) ?>
Might work.
I'm not sure if I did the forum blocks right though.
Last edited by BosenChang (July 15, 2020 16:34:15)
- LilGloGlo_76
-
100 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Maybe*correction made by @BosenChang*
<[list v] contains ((thing) * (2)) ?>
Might work.
I'm not sure if I did the forum blocks right though.
We didn't really need that. And I just tried it and you guys were right. It doesn't work.
- HTML-Fan
-
1000+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
<[list v] contains ((5) * (2)) ?> //is the same as
<[list v] contains [10] ?>
- Priff
-
66 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Support. this would be very useful for a crafting code that i'm working on and most of the recipes require multiple of a single item.
- _RareScratch_
-
23 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Ah thats fine. i was thinking about a variation of this earlier: a boolean that detects how many of a certain item is in a list!
anyways, your Og suggestion, no support, but a variation could work.
I thought of it myself and didn't see your idea!
Also, there aren't any kumquats near so you don't need guards right? xD
If your the original then support. I just made it up without using any others. Well I didn't see anything similar to this so I did it!
Ah well. Have a nice day!
Btw how to make coloured text?![]()
- _RareScratch_
-
23 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
I call them booleans. Its much more complicated if I called then predicates. I think you should correct it…<list contains at least () things in [after v] ?:: list>Also, these are not called “booleans,” they are called “predicates,” if you know what I mean.
Anyways, support!
And, its my grammar that I call them booleans, you mostly have a better structure of words.
Have a nice day.
when green flag clickedThe pen block color is fff43e.
set pen color to [#fff43e]
go to x: (a list of actions to draw have a nice day X) y: (a list of actions to draw have a nice day Y)
Last edited by _RareScratch_ (July 15, 2020 17:33:11)
- LilGloGlo_76
-
100 posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
<[list v] contains ((5) * (2)) ?> //is the same as
<[list v] contains [10] ?>
I didn't mean it like that. Not in numbers. But in text. You make a variable called “thing”. It didn't work anyway, But if it did it would be thing * 2 = thing thing.
- HTML-Fan
-
1000+ posts
A boolean block that scans if a thing has atleast 1 thing that is in a list.
Rather thingthing. I think that that's a thing in python.
Last edited by HTML-Fan (July 15, 2020 18:02:47)
- Discussion Forums
- » Suggestions
-
» A boolean block that scans if a thing has atleast 1 thing that is in a list.