Discuss Scratch

  • Discussion Forums
  • » Suggestions
  • » Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns [RSS Feed]
zacadoole1
Scratcher
100+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

Sorry if this has been posted before, but it seems the search function on the forums is broken (at least for me.)

Hallo, I'd like to suggest that we should be able to put round blocks, like variables, the join () () block, custom block arguments, and the (answer) block (just to name a few) in the place of dropdowns for variable/list blocks. For just one example, here is a custom block I tried to create earlier (possible only in Scratchblocks forum code) and was surprised that it wouldn't work. The following custom block would, in theory, take the contents of a list and transcribe them into another list (similar custom blocks could be made to transcribe the characters of a variable into a list and a the items of a list to a variable).

define transcribe (list1) -> (list2)
repeat (length of (list1 ::custom-arg) ::list)
insert (item [1 v] of (list1 ::custom-arg)) at [last v] of (list2 ::custom-arg)
delete [1 v] of (list1 ::custom-arg)
end

However, it is impossible to create this, because you can't put the custom block arguments in the place of the variable/list name dropdowns in these blocks:

set [variable v] to [ ]

insert [ ] at (0 v) of [list v]

You may be thinking, "Zac, you don't need a custom block for that!" Well, you're technically right, but by that logic nobody needs custom blocks for anything; but that's beside the point. There are other examples of where you might need to put a round block into a dropdown for a variable/list, this is just one example to prove my point. Furthermore, you're able to put round blocks in other blocks with dropdowns, such as the “play sound” block, so I'm not sure why it would be different for variables/lists.

play sound (answer) //this is possible

set (answer) to [ ] //this is not possible

Finally, you may be thinking, “Well, what if one of those round blocks tries to call a variable or list that doesn't exist?” Well, I know from experience that the current way Scratch handles variables being called that don't exist is to create them, but I'm sure an exception could be made to check if the variable is being called directly by name or through a round block, and if the former follow the current behavior, and if the latter just ignore the call (or maybe even just keep the current behavior, if that's what the Scratch team sees fit).

set [variable v] to [ ] //variable being called directly by name; follow current behavior

set (answer) to [ ] //variable being called through a round block; if variable doesn't exist, do nothing

In conclusion, I would very much appreciate it if Scratch were updated to allow us to put round blocks, such as the (answer) block and custom block arguments, into the dropdown slot for variables and lists.

P.S. Apologies if there's a proper name for them, I'm just calling them round blocks because it seems to be the simplest name for them.

Edit: CatsUnited has informed me that these round blocks are actually called “reporters” (thanks for that, btw ) but I'm not going to replace every instance of the phrase “round blocks” in this post to “reporters” for simplicity reasons, also to keep consistency with the title.

Edit 2: Edit: Come to think of it, it might make sense for reporters that call for variables and lists that don't exist to create them, because it would allow for projects where the user can create their own variables and lists, if that's something the creator wants… hmm…

Edit 3: This could also apply to the "broadcast received" hat block.

Last edited by Paddle2See (Jan. 20, 2025 22:02:54)

CatsUnited
Scratcher
1000+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

Reporters. Also, it would be nice to not have to edit the JSON. Support
zacadoole1
Scratcher
100+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

CatsUnited wrote:

Reporters. Also, it would be nice to not have to edit the JSON. Support
Ah, thanks, it was on the tip of my tongue…
FUTSync
Scratcher
100+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

Support
Prinseskat
Scratcher
1000+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

Support.

(item (1 v) of (not a list))
I suppose this would report as blank/the variable?
zacadoole1
Scratcher
100+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

aaroncavanagh wrote:

Support
Thanks, means a lot!

Prinseskat wrote:

Support.

(item (1 v) of (not a list))
I suppose this would report as blank/the variable?
Yeah, that would act as if the value of “not a list” were a list that were empty, but it wouldn't create a list called the value of “not a list.”

Edit: Come to think of it, it might make sense for reporters that call for variables and lists that don't exist to create them, because it would allow for projects where the user can create their own variables and lists, if that's something the creator wants… hmm…

Last edited by zacadoole1 (April 23, 2015 02:45:03)

Birdlegs
Scratcher
1000+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

*Drops down to knees* aughhhh, yes!!! Support to the max! I needed this so bad at one point. Not anymore, but still! Support to the maximum level!
zacadoole1
Scratcher
100+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

JoeyTheChicken wrote:

*Drops down to knees* aughhhh, yes!!! Support to the max! I needed this so bad at one point. Not anymore, but still! Support to the maximum level!
Yeah, I semi-know what you mean, if we had this technology my password encryptor would be on version 2.5 already!
Prinseskat
Scratcher
1000+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

zacadoole1 wrote:

JoeyTheChicken wrote:

*Drops down to knees* aughhhh, yes!!! Support to the max! I needed this so bad at one point. Not anymore, but still! Support to the maximum level!
Yeah, I semi-know what you mean, if we had this technology my password encryptor would be on version 2.5 already!
As CatsUnited said, you can “hack” the JSON code (https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/1810/?page=1), but this would be much better.
Actually, this could apply to broadcasts as well
broadcast (variable)//you can already do this

when I receive (variable)//but not this
Birdlegs
Scratcher
1000+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

Prinseskat wrote:

zacadoole1 wrote:

JoeyTheChicken wrote:

*Drops down to knees* aughhhh, yes!!! Support to the max! I needed this so bad at one point. Not anymore, but still! Support to the maximum level!
Yeah, I semi-know what you mean, if we had this technology my password encryptor would be on version 2.5 already!
As CatsUnited said, you can “hack” the JSON code (https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/1810/?page=1), but this would be much better.
Actually, this could apply to broadcasts as well
broadcast (variable)//you can already do this

when I receive (variable)//but not this
I guess we can do that. However, I don't know how to do that, and it sounds risky. Also, it sounds like a lot of digging through foreign code. Anyway, there's at least a workaround I wound up using, and it made life easier once I realized its implications. In my case, I was using lists, and to avoid making a million different lists, I made a bunch of custom blocks. The result was that it would read one master list, and before reading, the required contents were dumped into that master list. So you can always use one central list that it calls upon, if I made any sense at 12 AM. Maybe only in some cases, though.

Last edited by Birdlegs (April 23, 2015 04:14:15)

zacadoole1
Scratcher
100+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

Prinseskat wrote:

zacadoole1 wrote:

JoeyTheChicken wrote:

*Drops down to knees* aughhhh, yes!!! Support to the max! I needed this so bad at one point. Not anymore, but still! Support to the maximum level!
Yeah, I semi-know what you mean, if we had this technology my password encryptor would be on version 2.5 already!
As CatsUnited said, you can “hack” the JSON code (https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/1810/?page=1), but this would be much better.
Actually, this could apply to broadcasts as well
broadcast (variable)//you can already do this

when I receive (variable)//but not this
Yeahhhhhhh, I tried to edit the JSON code of a project once… let's just say it didn't go well. That's a bit complicated for anyone, even people like me who have been a Scratcher for years now. Besides, wouldn't that require downloading the project and reuploading it? What if I wanted to update a project that's already shared without losing my views, love-its, favorites, etc.?

Last edited by zacadoole1 (April 23, 2015 04:33:33)

zacadoole1
Scratcher
100+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

zacadoole1 wrote:

Prinseskat wrote:

zacadoole1 wrote:

JoeyTheChicken wrote:

*Drops down to knees* aughhhh, yes!!! Support to the max! I needed this so bad at one point. Not anymore, but still! Support to the maximum level!
Yeah, I semi-know what you mean, if we had this technology my password encryptor would be on version 2.5 already!
As CatsUnited said, you can “hack” the JSON code (https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/1810/?page=1), but this would be much better.
Actually, this could apply to broadcasts as well
broadcast (variable)//you can already do this

when I receive (variable)//but not this
Yeahhhhhhh, I tried to edit the JSON code of a project once… let's just say it didn't go well. That's a bit complicated for anyone, even people like me who have been a Scratcher for years now. Besides, wouldn't that require downloading the project and reuploading it? What if I wanted to update a project that's already shared without losing my views, love-its, favorites, etc.?

Okay, um, well, this is awkward. After writing that last post I began to question my JSON editing abilities, and I actually figured out how to edit the JSON for an individual sprite file so I could upload it into my existing project (see here). Go figure! But that doesn't undermine the point of this suggestion, if anything I think it makes it even more of a thing we need built directly into Scratch, because even though I could figure it out, I've kind of got more experience that a lot of other Scratchers, and I don't think most Scratchers would be able to (or even know what it means to) edit the JSON the way we know how to. So, this suggestion still stands.

Last edited by zacadoole1 (April 23, 2015 05:07:40)

Prinseskat
Scratcher
1000+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

zacadoole1 wrote:

-yepyepyep the rest is right above this-
Okay, um, well, this is awkward. After writing that last post I began to question my JSON editing abilities, and I actually figured out how to edit the JSON for an individual sprite file so I could upload it into my existing project (see here). Go figure! But that doesn't undermine the point of this suggestion, if anything I think it makes it even more of a thing we need built directly into Scratch, because even though I could figure it out, I've kind of got more experience that a lot of other Scratchers, and I don't think most Scratchers would be able to (or even know what it means to) edit the JSON the way we know how to. So, this suggestion still stands.
Exactly, being forced to find your way through a text-based programming language and know how to edit it without the world exploding just to change something in a simple programming language meant to introduce you to programming… (whew that was a long sentence) Not very logical. I've managed to do it, but only just.
stickfiregames
Scratcher
1000+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

Support.
matey1234
Scratcher
1000+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

stickfiregames wrote:

Support.
Iditaroid
Scratcher
500+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

I believe somebody suggested this a long time ago but you have a lot more info in your original post so it's alright I think. Support!
zacadoole1
Scratcher
100+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

stickfiregames wrote:

Support.

matey1234 wrote:

stickfiregames wrote:

Support.

Iditaroid wrote:

I believe somebody suggested this a long time ago but you have a lot more info in your original post so it's alright I think. Support!
Thanks, y'all, glad to see so many other people think we need this, too!

Last edited by zacadoole1 (April 23, 2015 16:03:06)

Seapats
Scratcher
70 posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

surpport!
Chainmanner
Scratcher
100+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

You have my support. I want this for custom broadcast reception and variable checking, it'll sure come in useful!
Vienradze
Scratcher
500+ posts

Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns

Support. I have a five screens long (when the blocks are minimum-sized) script on a project I'm working on (it's getting longer) because, due to not being able to put variable blocks in the place of list dropdowns, I have to do the following for each of the possible variables:
if <(foo) = []> then
Listy stuff here
end

I wish I was just able to do this:
add [] to (foo)

Last edited by Vienradze (Oct. 21, 2020 08:24:18)

  • Discussion Forums
  • » Suggestions
  • » Please allow us to put round blocks (e.g. variables, answer, custom block args, etc.) in the place of variable/list dropdowns [RSS Feed]

Powered by DjangoBB