Discuss Scratch

947___
Scratcher
39 posts

variables with checkboxes

this feature would be great for settings menus and stuff.

i thought of an idea for variables:
instead of 0 and 1, just a checkbox.

here are some images i made with inspect element:




and instead of just 0 and 1, you could set the values the variable sends when checked, or unchecked



ps: if ppl are wondering what the variable returns in the editor, it's whatever you set it for
for example, 0 and 1

pps: the blocks are like
set [ v] to (0 v)
change [ v] by (0)

ppps: it goes unchecked when it's neither of the set values

Last edited by 947___ (Aug. 4, 2023 13:31:25)


Fun_Cupcake_i81
Scratcher
1000+ posts

variables with checkboxes

This would be a cool feature to have, and it probably wouldn't be too hard to implement, so I support. Plus, it would make debugging stuff easier.

NullPointerException: myLife does not exist.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi! I'm Fun Cupcake and I pop onto the forums every now and then to ask questions or try and help out.
My goal is to help people out and brighten their days!
Also, I do in fact have a voice-acted series. It's a fantasy story and I'd love it if you'd check it out!
You could also check out Sprinkle Town, a town game I created inspired by Stardew Valley! (It's still in very early development stages.)
wikibro300000
Scratcher
1000+ posts

variables with checkboxes

Support, would be useful for settings and easier than making an entire different sprite


l
josueart
Scratcher
100+ posts

variables with checkboxes

Support, although you can workaround it with a slider.


Check this Scratch status monitor I made with BetterStack: https://scratch.betteruptime.com
wikibro300000
Scratcher
1000+ posts

variables with checkboxes

josueart wrote:

Support, although you can workaround it with a slider.
Checkbox looks better


l
josueart
Scratcher
100+ posts

variables with checkboxes

wikibro300000 wrote:

Checkbox looks better
Yeah


Check this Scratch status monitor I made with BetterStack: https://scratch.betteruptime.com
NotK3ndricAlt
Scratcher
1000+ posts

variables with checkboxes

No support. Workaround:
set [var v] to [no]

set [var v] to [yes]


If you see this on my signature, you’ve been infected by the NotK3ndricAlt virus! Put this on the top of your signature and add your name to the list of people who got this virus to help NotK3ndricAlt get more followers.
List of people who got this virus: NotK3ndricAlt

SAVE SCRATCH.
Forum clout (as of 27 Jan 2024): 11943
But then I had a very good idea. I used F5. See, using F5 gave me a whole new perspective and I was able to see a chest I couldn't have seen before.
Everytime I see the number 2024, I think its 2014 for a millisecond but then realize its 2024.
My browser / operating system: IPad iOS 16.1.1, Safari 16.1, No Flash version detected
Did you know that you can select the text then click on the BBCode tag you want to use and it'll pop up with the BBCode on the text?
Hola, soy NotK3ndricAlt! I speak Spanish and English.
My rentry!
Kids rule! B)
Participated in Scratch Awards 2023
pls plaey https://scratch.mit.edu/projects/928410544/ NOAW!!!M!!M!!M!M!!M!!M!!M!M!M!M!
#Add ForumPost Hearting (click to see suggestion)
Omni Studios Admin
(^v^ :: motion) // Kumquat protector
Hacked block:
when this sprite touches [mouse-pointer v] :: events hat
deweypointjr
Scratcher
100+ posts

variables with checkboxes

Support. I have had trouble making settings menus in the past. This would be really useful for that.

Hi there! I am DeweyPointJr, but you can call me Scripter!

#BEPURPLE
wikibro300000
Scratcher
1000+ posts

variables with checkboxes

NotK3ndricAlt wrote:

No support. Workaround:
set [var v] to [no]

set [var v] to [yes]
First you would need to make a sprite and make the code and the more sprites the more confusing the coding is


l
medians
Scratcher
1000+ posts

variables with checkboxes

You could also do something like this probably:
when this sprite clicked
if <(var) = [no]> then
set [var v] to [yes]
else
set [var v] to [no]
end
Also, maybe this could be done through boolean variables somehow if those are implemented?

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
;
947___
Scratcher
39 posts

variables with checkboxes

medians wrote:

You could also do something like this probably:
when this sprite clicked
if <(var) = [no]> then
set [var v] to [yes]
else
set [var v] to [no]
end
Also, maybe this could be done through boolean variables somehow if those are implemented?
yes, i use that alot

Boss_1s
Scratcher
100+ posts

variables with checkboxes

support, even though you can use the slider as a workaround, it doesn't look good.

Do <Highlight+shift+down arrow ::sensing> to see the rest of my signature. ::hat :: events

Generation 11: the first time you see this copy and paste it on top of your signature in the scratch forums and increase generation by 1. Social experiment.


Support the suggestion HERE by adding this button to your signature


Blocks Scratch should have:
substring [letter#1] [letter#2] [string] ::operators //finds the string between a string
pause [this script v] for (1) seconds ::control
(() or ()::operators)
(() and ()::operators) //same as the boolean, but for reporting
<my boolean ::variables> //only stores true or false
show all variables::variables
hide all variable::variables
show all lists::list
hide all lists::list
…and more!

Alt accounts: @Boss_1sALT(for cloud testing and other stuff), @Boss_1sARCHIVE(Archive of older game versions)

Hi, my name is @Boss_1s!
I'm 12 years old, and I joined Scratch to relearn block coding.
Other projects:
https://scratch.mit.edu/projects/869604293/ - cool MMO platformer
https://scratch.mit.edu/projects/792424859/ - This is my first ORIGINAL game.
https://scratch.mit.edu/projects/914686250/ - NEW! Remixed an RPG from Griffpatch, though it's pretty boring right now…
https://scratch.mit.edu/projects/895107188/ - NEW! Safe chat with anyone on Scratch, whitelist is present
Secret Special Advanced Project (SSAdP): COMPLETED!!! https://scratch.mit.edu/projects/946720515/

Predominant Languages:
I speak American English and Chinese.
我說美文和中文。

That's all for my signature, folks! cya!
wikibro300000
Scratcher
1000+ posts

variables with checkboxes

medians wrote:

You could also do something like this probably:
when this sprite clicked
if <(var) = [no]> then
set [var v] to [yes]
else
set [var v] to [no]
end
Also, maybe this could be done through boolean variables somehow if those are implemented?

wikibro300000 wrote:

First you would need to make a sprite and make the code and the more sprites the more confusing the coding is


l
mumu245
Scratcher
1000+ posts

variables with checkboxes

The default values should be 0 and 1.

select this text then press Ctrl+Shift+Down to read more
947___
Scratcher
39 posts

variables with checkboxes

mumu245 wrote:

The default values should be 0 and 1.
yeah

qwertycodechamp90411
Scratcher
100+ posts

variables with checkboxes

Support! This would make settings way easier.

The only thing I have to add is that I believe it should be a boolean-variable.
<checkbox checked?::variables>
If it stays a reporter, at least add a pop-up menu similar to the cloud variable message.
'Please note, the variable will report 1 when checked, and 0 when unchecked. You can change these values by right-clicking the variable on-stage'.

I would say make it true/false, not 0/1 for new scratchers, but that would be way too inconvenient (for me, at least).
In a script:
if <checkbox checked?::variables> then 
set [difficulty v] to (1)


else
set [difficulty v] to (0)
end

Last edited by qwertycodechamp90411 (Aug. 4, 2023 21:33:01)


Useful Links: Text Generator ——— Encoders/Decoders (Normal, Case Sensitive) ——— New Math Blocks ——— Comment what next on my profile!
Wait, we’re at 900 million projects? So close to 1 billion projects uploaded to the server!

<((x) ^ ((1) / (y))::operators) = ((y) √ (x)::operators)> // is false if x < 0???
Hi! I'm qwertycodechamp90411. I'm most active on the suggestions forum and the help with scripts forum, because I like to help other people and improve scratch! I like to think I'm good at scratch, but there's a lot I don't know/understand (how on earth do scrolling platformers work lol). As a general rule of thumb, I should have the answer if it's math related, because I'm a very stereotypical nerd when it comes to math.
947___
Scratcher
39 posts

variables with checkboxes

qwertycodechamp90411 wrote:

Support! This would make settings way easier.

The only thing I have to add is that I believe it should be a boolean-variable.
<checkbox checked?::variables>
If it stays a reporter, at least add a pop-up menu similar to the cloud variable message.
'Please note, the variable will report 1 when checked, and 0 when unchecked. You can change these values by right-clicking the variable on-stage'.

I would say make it true/false, not 0/1 for new scratchers, but that would be way too inconvenient (for me, at least).
In a script:
if <checkbox checked?::variables> then 
set [difficulty v] to (1)


else
set [difficulty v] to (0)
end
<checkbox [ v] checked? :: variables>
is what you mean

Last edited by 947___ (Aug. 4, 2023 21:38:30)


qwertycodechamp90411
Scratcher
100+ posts

variables with checkboxes

947___ wrote:

qwertycodechamp90411 wrote:

Support! This would make settings way easier.

The only thing I have to add is that I believe it should be a boolean-variable.
<checkbox checked?::variables>
If it stays a reporter, at least add a pop-up menu similar to the cloud variable message.
'Please note, the variable will report 1 when checked, and 0 when unchecked. You can change these values by right-clicking the variable on-stage'.

I would say make it true/false, not 0/1 for new scratchers, but that would be way too inconvenient (for me, at least).
In a script:
if <checkbox checked?::variables> then 
set [difficulty v] to (1)


else
set [difficulty v] to (0)
end
<checkbox [ v] checked? :: variables>
is what you mean
No I meant that the variable name was checkbox lol.

Honestly that's better.

Useful Links: Text Generator ——— Encoders/Decoders (Normal, Case Sensitive) ——— New Math Blocks ——— Comment what next on my profile!
Wait, we’re at 900 million projects? So close to 1 billion projects uploaded to the server!

<((x) ^ ((1) / (y))::operators) = ((y) √ (x)::operators)> // is false if x < 0???
Hi! I'm qwertycodechamp90411. I'm most active on the suggestions forum and the help with scripts forum, because I like to help other people and improve scratch! I like to think I'm good at scratch, but there's a lot I don't know/understand (how on earth do scrolling platformers work lol). As a general rule of thumb, I should have the answer if it's math related, because I'm a very stereotypical nerd when it comes to math.
xnousnow
Scratcher
9 posts

variables with checkboxes

Yeah, we def need a boolean variable, it's pain to make all the variables
set [boolean variable v] to [0]
set [boolean variable v] to [1]

if <(boolean variable) = (0)> then
say [it's false]
end
It would change to:
set [boolean variable v] to <false>
set [boolean variable v] to <true>

if <not<boolean variable>> then
say [it's false]
end
Also, that way, <true>/<false> value should be made.

ST really should make beta of scratch 4
947___
Scratcher
39 posts

variables with checkboxes

xnousnow wrote:

Yeah, we def need a boolean variable, it's pain to make all the variables
set [boolean variable v] to [0]
set [boolean variable v] to [1]

if <(boolean variable) = (0)> then
say [it's false]
end
It would change to:
set [boolean variable v] to <false>
set [boolean variable v] to <true>

if <not<boolean variable>> then
say [it's false]
end
Also, that way, <true>/<false> value should be made.

qwertycodechamp90411 wrote:

Support! This would make settings way easier.

The only thing I have to add is that I believe it should be a boolean-variable.
<checkbox checked?::variables>
If it stays a reporter, at least add a pop-up menu similar to the cloud variable message.
'Please note, the variable will report 1 when checked, and 0 when unchecked. You can change these values by right-clicking the variable on-stage'.

I would say make it true/false, not 0/1 for new scratchers, but that would be way too inconvenient (for me, at least).
In a script:
if <checkbox checked?::variables> then 
set [difficulty v] to (1)


else
set [difficulty v] to (0)
end
it could just be
<(my variable) = (1)>
but maybe once we get custom reporters and booleans
define () // pretend there's no block shape there
return (value::custom)::custom

define <>
return (value::custom)::custom

Last edited by 947___ (Aug. 5, 2023 01:24:16)


Powered by DjangoBB