Discuss Scratch

medians
Scratcher
1000+ posts

Boolean variables :D

usefun wrote:

Gego51 wrote:

http://scratch.mit.edu/projects/10841526/
Don't advertise
Did you even look at the id of that project or the time of that post?? The project isn't even shared anymore.
https://scratch.mit.edu/discuss/post/60427/

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
usefun
Scratcher
1000+ posts

Boolean variables :D

deleted

Last edited by usefun (Jan. 11, 2024 04:35:27)


Alt: @usefun2
My profile
Sinistar (My best game)
See your exact post count here.
unfortunately this signature has been corrupted by an evil cat blockCAT BLOCKS WILL RULE
MythosLore
Scratcher
1000+ posts

Boolean variables :D

usefun wrote:

deleted
<boolean variable :: variables>

actually working on a game so i'll be a bit less active on the forums
mjc9576
Scratcher
3 posts

Boolean variables :D

i know how to do constants which could be similar to what you want.
for a false constant use something like
if <[1] = [0]> then
say [ur code]
end
and for a true constant use something like
if <[1] = [1]> then
say [ur code]
end
starlightsparker
Scratcher
1000+ posts

Boolean variables :D

kNoobLauch wrote:

Yes, I can… but boolean variables would be also nice ._.
A lot of things would be nice but if there’s an easy workaround really what’s the point?

✮˚. ᵎᵎ ?彡⋆。˚ starlight !! * ੈ✩‧₊˚ ✧˖° female !! ⋆。°✩ they.them !!‧˚₊ muslim !!✶ .ᐟ
︶꒦꒷order at star's cafe! served w/ love꒷꒦︶
star's cafe is a store to order banners, pfps, and more!
(rounded) 1000th post | (actual) 1000th post | first post
~ pakistani muslim ~ ~ born in arabia ~ palestine supporter! ~
stop the Islam hate!useful custom blockslatest projectcomment herePython Learning History
Scratch inspired me to want to become a programmer when i grow up. I plan on learning python :>
medians
Scratcher
1000+ posts

Boolean variables :D

Bringing this topic up.

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
Malicondi
Scratcher
1000+ posts

Boolean variables :D

<boolean variable ::variables> 
cool idea, but i think it might be a little annoying, and you can always set a variable to 0 or 1

but, if this allowed us to add a boolean that doesn't exist, that would be extremely helpful

post #1000 post #100 i help in the forums post #1 post #500 0 second ninja
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.

coming soon :)


medians
Scratcher
1000+ posts

Boolean variables :D

Bringing this topic up.

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
xXRedTheCoderXx
Scratcher
1000+ posts

Boolean variables :D

I think this would go great with a new toggle block, too.
toggle boolean [foo v] :: variables
In other programming languages, you can do something like
foo = !foo;
but in Scratch you'd have to do something like,
if <(foo) = [true]> then 
set [foo v] to [false]
else
set [foo v] to [true]
end

or::grey

set [foo v] to <not <(foo) = [true]>>
so a toggle block would save time and make code cleaner / more compact. So would this suggestion in general, as you'd be able to do just
if <foo::variables> then
...::grey
end

as opposed to::grey

if <(foo)=[true]> then
...::grey
end
Look how much more readable that is!

Last edited by xXRedTheCoderXx (March 3, 2024 03:41:47)


tenith
Scratcher
2 posts

Boolean variables :D

set [ v] to [true]
mjc9576
Scratcher
3 posts

Boolean variables :D

first one sets boolean variable, second one is to type “true” or “false” to easily choose which value to set your boolean variable to
set <> to <>
<[]>
cookieclickerer33
Scratcher
1000+ posts

Boolean variables :D

starlightsparker wrote:

kNoobLauch wrote:

Yes, I can… but boolean variables would be also nice ._.
A lot of things would be nice but if there’s an easy workaround really what’s the point?

Just like with
<[] < []>
It’s to make it faster to program things, you could just use the opposite inputs on the greater than block.

It’s similar with
change [var v] by (1)
You can just do this
set [var v] to ((var) + (1)
But it’s easier to use change by than it is to use set.


why do we have
say [] for (2) secs
think [] for (2) secs

When you can just do this

define say (thing) for (time) secs
say (thing::custom)
wait (time::custom) secs
say []

Last edited by cookieclickerer33 (March 11, 2024 11:30:52)


⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

cookieclickerer33
Scratcher
1000+ posts

Boolean variables :D

Y’all seem to be overthinking this, all they need to do is allow us to do this
if (var) then

end
This 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 with
if (item ( v) of [list v] :: list) then

end
Being allowed (for some reason we can only begin to comprehend) so just let variables do the same.

Last edited by cookieclickerer33 (March 11, 2024 11:34:11)


⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

generalbrock2014
Scratcher
3 posts

Boolean variables :D

WELCOME TO THE SCRATCH 4.0 BLOCKS AND TODAY WE'RE GONNA MAKE BLOCKS INCLUDING YOU. Lets do some EXAMPLES!!!!!!!!!!!

Example #1 to #5 (motion)
I
I
I
v
touching x:()y:()? :: motion boolean // if sprite is touching the x and the y position of the sprite then it will report true else it will report false
if touching[edge v], bounce :: motion // if this sprite is touching something then it will bounce
point towards x:()y:() :: motion // it will point towards x and y
[sprite v] follow [sprite2 v] :: motion // the sprite will follow a another sprite
set[x v]to() :: motion // sets it into x or y

SCRATCH 4.0 IS COMING IN 2025!!!

Last edited by generalbrock2014 (May 9, 2024 15:57:22)

BigNate469
Scratcher
1000+ posts

Boolean variables :D

generalbrock2014 wrote:

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
is pen down? :: pen boolean // r
There is no evidence that Scratch 4.0 is coming out, ever.

Highlight any part of this signature and press ctrl+shift+down arrow to see the rest of it
forever
if <person asks [what's a signature] :: sensing> then
Redirect to [https://en.scratch-wiki.info/wiki/Signature] :: motion
end
end
Please read the list of Officially Rejected Suggestions before posting a suggestion for Scratch! 100th post
This signature is designed to be as helpful as possible.
View all of the topics you've posted in:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=topics
View all of your posts:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=posts
Forum tips:
Don't post in topics where the latest post is over ~2 months old, unless you have something critical to add. Especially in topics that are several years old- it isn't helpful, and is known as necroposting.
Don't post unrelated things in topics, including questions of your own. Make a new topic for your questions.
You can use the
 [color=color name or hexadecimal value here] and [/color] 
tags to color text.
Lesser-known Scratch URLs:
https://scratch.mit.edu/projects/PROJECT ID HERE/remixtree (replace “PROJECT ID HERE” with project id number. Shows all the remixes of the project, and the remixes of those projects, and the remixes of those projects, and so on, as a chart. Link currently redirects to one of my projects)
View a larger list at: https://scratch.mit.edu/discuss/topic/542480/
Why @Paddle2See's responses are so often identical: https://scratch.mit.edu/discuss/topic/762351/
1000th post
julmik6478
Scratcher
500+ posts

Boolean variables :D

vacuumfan7072 wrote:

if <variable=1>
if <variable=true>

dvd4 wrote:

You could also just set it to “true” or “false”.

if<(i)=>
}
*block here*
}
Why you don't use forum blocks?


Support the suggestion HERE by adding this button to your signature

My acounts in some websites:
youtube
planet minecraft
mcreator
Hawaiiscratcher67
Scratcher
12 posts

Boolean variables :D

You can just use
set [ v] to [1]
It's as simple as that.

Last edited by Hawaiiscratcher67 (May 11, 2024 13:37:53)


Say hello to my signature!

Have you ever wondered if a smart phycological being merged with a scratcher?
This is what happens.

if <Nobody is looking> then
Scratch your life out
end

define Nobody is looking
repeat until <(direction) = [0]>
turn cw (15) degrees
end
define Scratch your life out
repeat until <(timer) > ((free time) + (homework time))>
set [Scratch mode v] to [true v]
repeat until <(clone amount) = [300]>

create clone of [myself v]
end
end
medians
Scratcher
1000+ posts

Boolean variables :D

Hawaiiscratcher67 wrote:

You can just use
set [ v] to [1]
It's as simple as that.
Yes, but you cannot fit those into boolean inputs, so you have to do:
<(var) = [1]>
Anyways, bringing this topic up.

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;

Powered by DjangoBB