Discuss Scratch

_RareScratch_
Scratcher
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.
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 clicked
add [a] to [after v]
add [b] to [after v]
list contains atleast [2 v] thing/s in [after v] ?
Those are the 2 reasons why.

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
Scratcher
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_
Scratcher
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
Scratcher
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
Scratcher
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…
<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
Scratcher
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
Scratcher
100+ posts

A boolean block that scans if a thing has atleast 1 thing that is in a list.

_RareScratch_ wrote:

Try this! Not by me but it is a great project.
forever
imagine
fun
projects
end

Stay safe!
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.

Signatures are seen under a light gray line on every post you make, like under this line V
_RareScratch_
Scratcher
23 posts

A boolean block that scans if a thing has atleast 1 thing that is in a list.

HighFlyer222 wrote:

_RareScratch_ wrote:

Try this! Not by me but it is a great project.
forever
imagine
fun
projects
end

Stay safe!
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.

Signatures are seen under a light gray line on every post you make, like under this line V
kk
scratchykit5743
Scratcher
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.
LilGloGlo_76
Scratcher
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.
HTML-Fan
Scratcher
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
Scratcher
100 posts

A boolean block that scans if a thing has atleast 1 thing that is in a list.

LilGloGlo_76 wrote:

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
Scratcher
1000+ posts

A boolean block that scans if a thing has atleast 1 thing that is in a list.

LilGloGlo_76 wrote:

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
Scratcher
100 posts

A boolean block that scans if a thing has atleast 1 thing that is in a list.

BosenChang wrote:

LilGloGlo_76 wrote:

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
Scratcher
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
Scratcher
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_
Scratcher
23 posts

A boolean block that scans if a thing has atleast 1 thing that is in a list.

scratchykit5743 wrote:

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.
Ah thats fine.
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_
Scratcher
23 posts

A boolean block that scans if a thing has atleast 1 thing that is in a list.

BosenChang wrote:

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!
I call them booleans. Its much more complicated if I called then predicates.
And, its my grammar that I call them booleans, you mostly have a better structure of words.
Have a nice day.
when green flag clicked
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)
The pen block color is fff43e.

Last edited by _RareScratch_ (July 15, 2020 17:33:11)

LilGloGlo_76
Scratcher
100 posts

A boolean block that scans if a thing has atleast 1 thing that is in a list.

HTML-Fan wrote:

<[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
Scratcher
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)

Powered by DjangoBB