Discuss Scratch
- Discussion Forums
- » Suggestions
- » Boolean variables :D
- Foldy_TPOT
-
100+ posts
Boolean variables :D
True.There is no evidence that Scratch 4.0 is coming out, ever. WELCOME TO THE SCRATCH 4.0 BLOCKS AND TODAY WE'RE GONNA MAKE BLOCKS INCLUDING YOU. Lets do some EXAMPLES!!!!!!!!!!!
examples #1 to # 10
I
I
I
v
- medians
-
1000+ posts
Boolean variables :D
No support.1. Why not just set the variable to the condition??
2. Variables cannot fit in boolean inputs, so you have to do = [1] or = [true]
Last edited by medians (June 15, 2024 17:23:45)
- cookieclickerer33
-
1000+ posts
Boolean variables :D
I did some modding, the reason you can do this is because the item of list block can be placed in any input slot, even if it’s read only. Y’all seem to be overthinking this, all they need to do is allow us to do thisThis would work perfectly fine and is only a few lines of code to change. I would know because I’ve done it before. It accepts the string “true” the Boolean “true” (yes they are different things) and the number and string “1”
They already do this withBeing allowed (for some reason we can only begin to comprehend) so just let variables do the same.
If you have custom reporters, you can even place the block into the define hat
- epicdude512
-
100+ posts
Boolean variables :D
What would this accomplish that normal variables could not? why would i ever use a variable with only 2 possible outputs instead of a normal variable where the possible outputs are literally infinite.
- MillionOfficial
-
500+ posts
Boolean variables :D
Because she's lazy. Yes, I can… but boolean variables would be also nice ._.
Support and
BUMP
Last edited by MillionOfficial (Nov. 13, 2024 14:45:07)
- MillionOfficial
-
500+ posts
Boolean variables :D
It looks like this:WHAT ARE BOOLEAN VARIABLES???????!?!?!?:oOne question:
A variable that can be either true or false. If it was a Scratch block it would have pointy ends.
- epicdude512
-
100+ posts
Boolean variables :D
Why do you support, also you cant bump a post that has been bumped in the last 24 hours or is on the front pageBecause she's lazy. Yes, I can… but boolean variables would be also nice ._.
Support and
BUMP
- medians
-
1000+ posts
Boolean variables :D
You would be able to put it in boolean inputs as well (which you cannot currently do with variables, and when this topic was made, the item () of () and item # of () in () block could not be put in boolean inputs without hacked blocks), and also, I've seen a lot of cases (ex. clones and toggles) where someone would only want booleans. What would this accomplish that normal variables could not? why would i ever use a variable with only 2 possible outputs instead of a normal variable where the possible outputs are literally infinite.
- epicdude512
-
100+ posts
Boolean variables :D
Sorry if im not understanding correctly (im trying to cut down on my caffine intake and im having a major energy crash because of it), but if you mean what i think you are saying, i sort of get the second part that it would be helpful back then, but if for the first part you mean you cant put variables in blocks like thisYou would be able to put it in boolean inputs as well (which you cannot currently do with variables, and when this topic was made, the item () of () and item # of () in () block could not be put in boolean inputs without hacked blocks), and also, I've seen a lot of cases (ex. clones and toggles) where someone would only want booleans. What would this accomplish that normal variables could not? why would i ever use a variable with only 2 possible outputs instead of a normal variable where the possible outputs are literally infinite.
the first part could be probably solved with
but for the third point if you mean someone could only want yes or no, why would we need a whole new block for that when we could just use a variable to do the exact same task
- medians
-
1000+ posts
Boolean variables :D
Yea, but the point of this suggestion is so you don't have to do that, since variables can be booleans in other programming languages (you can have variables that can only be booleans in a lot of languages) and you don't have to do that in other languages because it is redundant. Though Scratch could also just add the ability to put variables into boolean inputs, like this:Sorry if im not understanding correctly (im trying to cut down on my caffine intake and im having a major energy crash because of it), but if you mean what i think you are saying, i sort of get the second part that it would be helpful back then, but if for the first part you mean you cant put variables in blocks like thisYou would be able to put it in boolean inputs as well (which you cannot currently do with variables, and when this topic was made, the item () of () and item # of () in () block could not be put in boolean inputs without hacked blocks), and also, I've seen a lot of cases (ex. clones and toggles) where someone would only want booleans. What would this accomplish that normal variables could not? why would i ever use a variable with only 2 possible outputs instead of a normal variable where the possible outputs are literally infinite.the first part could be probably solved with
but for the third point if you mean someone could only want yes or no, why would we need a whole new block for that when we could just use a variable to do the exact same task
Last edited by medians (Nov. 13, 2024 15:19:53)
- epicdude512
-
100+ posts
Boolean variables :D
Yea, but the point of this suggestion is so you don't have to do that, since variables can be booleans in other programming languages (you can have variables that can only be booleans in a lot of languages) and you don't have to do that in other languages because it is redundant. Though Scratch could also just add the ability to put variables into boolean inputs, like this:
ok, im mixed about that solution because while its good to know in the future, it would be absolutely confusing for someone who does not know what that means, as i feel like this
is much easier to understand than
. but like i said, if you figure out what it means, you probably will be better at coding off scratch, however i dont support making it its own block/option, as its basically just another block thats worse than another
- jonsonfan
-
100+ posts
Boolean variables :D
well even tho it whould be easy to work with for some users new scratchers can be confused by this and you can already do stuff like this with blocks like this
- 8to16
-
1000+ posts
Boolean variables :D
(#336)New scratchers won't know that workaround, this would be easier to understand
well even tho it whould be easy to work with for some users new scratchers can be confused by this and you can already do stuff like this with blocks like this
And close your scratchblocks tags please
8to16
- medians
-
1000+ posts
Boolean variables :D
You can already do that though for the item () of () block, and the item # of () in () block though, so that's why I suggested it as an alternative solution: ok, im mixed about that solution because while its good to know in the future, it would be absolutely confusing for someone who does not know what that means, as i feel like this
but like i said, if you figure out what it means, you probably will be better at coding off scratch, however i dont support making it its own block/option, as its basically just another block thats worse than another

- medians
-
1000+ posts
Boolean variables :D
If you have a truthy value (ex. true/1), then it runs, like a boolean. The second one just works like the contains list block since it will report 0 if the list doesn't contain the entered string and a positive number otherwise. If that solution was implemented, then having a truthy value for the variable would do the same thing.What does that do anyways? Like how does it work?You can already do that though for the item () of () block, and the item # of () in () block though, so that's why I suggested it as an alternative solution: ok, im mixed about that solution because while its good to know in the future, it would be absolutely confusing for someone who does not know what that means, as i feel like this
but like i said, if you figure out what it means, you probably will be better at coding off scratch, however i dont support making it its own block/option, as its basically just another block thats worse than another
Last edited by medians (Nov. 20, 2024 21:42:00)
- mcsquaggle
-
500+ posts
Boolean variables :D
support, logic variables are a real timesaver when it comes to coding. as for the whole “too confusing for new scratchers” argument:
that is why tutorials exist, a way for scratchers to look at instructions and an explanation on how its used, what it does, and ect. furthermore, that argument can be applied to things like lists, custom blocks, and these blocks
that is why tutorials exist, a way for scratchers to look at instructions and an explanation on how its used, what it does, and ect. furthermore, that argument can be applied to things like lists, custom blocks, and these blocks
- Discussion Forums
- » Suggestions
-
» Boolean variables :D