Discuss Scratch
- 1132262
-
Scratcher
1000+ posts
Components
So, I code in Scratch a lot, and for pretty much all projects, chances are, you need at least two or three of the same thing.
Sure, you can duplicate it, but if you're making, say, a PTE, you're going to need components like () + (x) and () + (y) in every letter. Duplicating them takes a surprising amount of time. It would be much more efficient to have an option in the right click menu that says something like ‘make component’.
If you're thinking something like ‘we already have custom blocks’, please bear with me for a moment. Until we have custom reporters and booleans, there's not really a way to drag a complex reporter or boolean out of the block bar. If you're having trouble understanding what I mean, please look at the graphic below, for how it could work.

Sure, you can duplicate it, but if you're making, say, a PTE, you're going to need components like () + (x) and () + (y) in every letter. Duplicating them takes a surprising amount of time. It would be much more efficient to have an option in the right click menu that says something like ‘make component’.
If you're thinking something like ‘we already have custom blocks’, please bear with me for a moment. Until we have custom reporters and booleans, there's not really a way to drag a complex reporter or boolean out of the block bar. If you're having trouble understanding what I mean, please look at the graphic below, for how it could work.

Last edited by 1132262 (Oct. 20, 2019 17:55:13)
- 1132262
-
Scratcher
1000+ posts
Components
Why not use the backpack?Admittedly, I hadn't really thought of that, but there are a few reasons that it wouldn't work very well for this purpose. It is sometimes glitchy, and can't usually handle large scripts. Also, if you have a large set of assets for each project, and you're working on multiple projects, it would become complicated to know which scripts to pull out for which projects (the thumbnail size for scripts in the backpack is low, and it's almost impossible to read text on the blocks). And personally, I wouldn't really want to fill my backpack with a bunch of small scripts. It makes it harder to find things that I use in most of my projects.
- Fupicat
-
Scratcher
1000+ posts
Components
I don't understand the concept. What are these “set x to x” blocks?
- WindOctahedron
-
Scratcher
1000+ posts
Components
I don't understand the concept. What are these “set x to x” blocks?The first one is as in “x position” (coordinates), the second one is more like “3x=12” (independent variable).
I think that the second “x” is a custom operator.
- Fupicat
-
Scratcher
1000+ posts
Components
What would that be used for?I don't understand the concept. What are these “set x to x” blocks?The first one is as in “x position” (coordinates), the second one is more like “3x=12” (independent variable).
I think that the second “x” is a custom operator.
- Nambaseking01
-
Scratcher
1000+ posts
Components
I can't seem to understand this system. Do all numerical and boolean values from the custom blocks come in this “Components” section?
- 1132262
-
Scratcher
1000+ posts
Components
I can't seem to understand this system. Do all numerical and boolean values from the custom blocks come in this “Components” section?No. Only stuff that you drag into the components section.
The second x is an input from a custom block.What would that be used for?I don't understand the concept. What are these “set x to x” blocks?The first one is as in “x position” (coordinates), the second one is more like “3x=12” (independent variable).
I think that the second “x” is a custom operator.
- Fupicat
-
Scratcher
1000+ posts
Components
???I can't seem to understand this system. Do all numerical and boolean values from the custom blocks come in this “Components” section?No. Only stuff that you drag into the components section.The second x is an input from a custom block.What would that be used for?I don't understand the concept. What are these “set x to x” blocks?The first one is as in “x position” (coordinates), the second one is more like “3x=12” (independent variable).
I think that the second “x” is a custom operator.
I'm really confused. Why would you need input from a custom block outside of that block?
Can you give a practical example?
- 1132262
-
Scratcher
1000+ posts
Components
I just explained, but the server broke down, and I'm too tired to explain again. Also, everything's explained in the first post.???I can't seem to understand this system. Do all numerical and boolean values from the custom blocks come in this “Components” section?No. Only stuff that you drag into the components section.The second x is an input from a custom block.What would that be used for?I don't understand the concept. What are these “set x to x” blocks?The first one is as in “x position” (coordinates), the second one is more like “3x=12” (independent variable).
I think that the second “x” is a custom operator.
I'm really confused. Why would you need input from a custom block outside of that block?
Can you give a practical example?
- Fupicat
-
Scratcher
1000+ posts
Components
It's clearly not, though, since so many people are confused by the suggestion.-snip-I just explained, but the server broke down, and I'm too tired to explain again. Also, everything's explained in the first post.
- -ShadowOfTheFuture-
-
Scratcher
1000+ posts
Components
My current understanding of this suggestion is: a “component” is just a chunk of a script saved to the palette, the main use of which would be to save time when you need to use some unit of code multiple times. Is that correct?
This seems like a decent idea; from experience, duplicating parts of scripts multiple times can be a real pain, especially since you can't just copy-paste lines of code; and a smaller piece like “set x to ((variable) + (1))” often doesn't merit an entire custom block of its own. That being said, at least for me, it usually isn't more than a minor annoyance at most, and you can typically find ways to express the more complex ones in terms of custom blocks: for reporters, you can just make a list called “reporter values” or something. (I agree that custom reporters would have benefits in this respect.)
I'd say semi-support for now.
This seems like a decent idea; from experience, duplicating parts of scripts multiple times can be a real pain, especially since you can't just copy-paste lines of code; and a smaller piece like “set x to ((variable) + (1))” often doesn't merit an entire custom block of its own. That being said, at least for me, it usually isn't more than a minor annoyance at most, and you can typically find ways to express the more complex ones in terms of custom blocks: for reporters, you can just make a list called “reporter values” or something. (I agree that custom reporters would have benefits in this respect.)
I'd say semi-support for now.
- 1132262
-
Scratcher
1000+ posts
Components
My current understanding of this suggestion is: a “component” is just a chunk of a script saved to the palette, the main use of which would be to save time when you need to use some unit of code multiple times. Is that correct?Yes, exactly.
- Fupicat
-
Scratcher
1000+ posts
Components
That makes sense. I get your idea now. I think it does have its uses, but I feel like adding copy-paste functionality would fix the issues this would solve more effectively (it's also something the community has been asking for years), because what you've suggested is way too similar to custom blocks.
- LastContinue
-
Scratcher
500+ posts
Components
So… Custom Reporters? (Reporters are the circle blocks, that you can't make with custom blocks)My current understanding of this suggestion is: a “component” is just a chunk of a script saved to the palette, the main use of which would be to save time when you need to use some unit of code multiple times. Is that correct?Yes, exactly.
Last edited by LastContinue (Oct. 25, 2019 22:37:52)
- 1132262
-
Scratcher
1000+ posts
Components
No. (I mean, those would be nice too.) ShadowOfTheFuture explained it perfectly. (It doesn't need to be only reporters. It can be booleans and blocks as well.)So… Custom Reporters? (Reporters are the circle blocks, that you can't make with custom blocks)My current understanding of this suggestion is: a “component” is just a chunk of a script saved to the palette, the main use of which would be to save time when you need to use some unit of code multiple times. Is that correct?Yes, exactly.
- mica43683
-
Scratcher
500+ posts
Components
So, a backpack specific to one project? Sounds like it could have some interesting uses, such as not cluttering the backpack. I support.
- Nambaseking01
-
Scratcher
1000+ posts
Components
Oh, now I seem to understand. But, the backpack still exists like Sheep_maker said above so I don't see why we would need components..?
- 1132262
-
Scratcher
1000+ posts
Components
Oh, now I seem to understand. But, the backpack still exists like Sheep_maker said above so I don't see why we would need components..?
Also, the backpack is fairly slow with loading. It would be even slower than duplicating.Why not use the backpack?Admittedly, I hadn't really thought of that, but there are a few reasons that it wouldn't work very well for this purpose. It is sometimes glitchy, and can't usually handle large scripts. Also, if you have a large set of assets for each project, and you're working on multiple projects, it would become complicated to know which scripts to pull out for which projects (the thumbnail size for scripts in the backpack is low, and it's almost impossible to read text on the blocks). And personally, I wouldn't really want to fill my backpack with a bunch of small scripts. It makes it harder to find things that I use in most of my projects.








