Discuss Scratch
- Discussion Forums
- » Suggestions
- » Access custom blocks from all sprites (global procedures)
- RobloxianMinecraft
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
oh c'mon, why st dont just add this stuff
its not even hard to implement, they did the same thing with variables
its not even hard to implement, they did the same thing with variables
- -effortIess-
-
Scratcher
100+ posts
Access custom blocks from all sprites (global procedures)
oh c'mon, why st dont just add this stufflol, not to be rude, but are you a web designer? Some stuff seems pretty simple, but Engineering has to make everything “scaleable”, that is, it has to work on basically every device, every obscure browser, every OS, every version (to an extent). The last thing they want is a “simple” feature breaking Scratch for schools lol.
its not even hard to implement, they did the same thing with variables
- EDawg2011
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
lol, not to be rude, but are you a web designer? Some stuff seems pretty simple, but Engineering has to make everything “scaleable”, that is, it has to work on basically every device, every obscure browser, every OS, every version (to an extent). The last thing they want is a “simple” feature breaking Scratch for schools lol.Development is hard; they have finite time, their projects need a well-defined scope, a lot more is involved than most people might think, they have a big website to take care of, tasks need to be prioritized, everything needs to be maintained forever, and they need to do ALL of this while keeping the site running.
- -effortIess-
-
Scratcher
100+ posts
Access custom blocks from all sprites (global procedures)
Not to mention that they are a PoOr NoNpRoFiT with nO mOnEy /jlol, not to be rude, but are you a web designer? Some stuff seems pretty simple, but Engineering has to make everything “scaleable”, that is, it has to work on basically every device, every obscure browser, every OS, every version (to an extent). The last thing they want is a “simple” feature breaking Scratch for schools lol.Development is hard; they have finite time, their projects need a well-defined scope, a lot more is involved than most people might think, they have a big website to take care of, tasks need to be prioritized, everything needs to be maintained forever, and they need to do ALL of this while keeping the site running.
- -effortIess-
-
Scratcher
100+ posts
Access custom blocks from all sprites (global procedures)
~ bump ~
- nww02
-
New Scratcher
1 post
Access custom blocks from all sprites (global procedures)
One of the problems I have with my program is that I need to create clones of sprites.. Each sprite has quite complex AI, but because of all the code in the sprite the cloning process is slow (~0.5s per sprite now, and only going to get worse) Of course, if I want 20 clones, that means a ten second or more wait while the level / game starts.
If I could, say, put global blocks into the stage, which take parameters, and they run independently (threaded) so that they're multi-access from sprites concurrently without globbing over shared variables, I could reduce the code within my sprites and shorten the clone time. Perhaps just make stage functions callable from sprites on that stage. They can access global variables etc, but any parameters that are passed in are called-by-value, as they are with normal blocks
I imagine it would be possible to just add more “dummy” parameters to the block and leave them blank in order to have local variables. A nicer way would be to have a third parameter type (local variables) which don't show up in the block template when you try to call it, but which are assignable within the block.. Which means, of course, allowing the set() to access local parameters, which it doesn't at the moment….
If I could, say, put global blocks into the stage, which take parameters, and they run independently (threaded) so that they're multi-access from sprites concurrently without globbing over shared variables, I could reduce the code within my sprites and shorten the clone time. Perhaps just make stage functions callable from sprites on that stage. They can access global variables etc, but any parameters that are passed in are called-by-value, as they are with normal blocks
I imagine it would be possible to just add more “dummy” parameters to the block and leave them blank in order to have local variables. A nicer way would be to have a third parameter type (local variables) which don't show up in the block template when you try to call it, but which are assignable within the block.. Which means, of course, allowing the set() to access local parameters, which it doesn't at the moment….
- medians
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
Bringing this topic up.
- julmik6478
-
Scratcher
500+ posts
Access custom blocks from all sprites (global procedures)
Support beacuse it can make this project better.
- CrazyEnglishTeacher
-
Scratcher
1 post
Access custom blocks from all sprites (global procedures)
Will make code much easier to maintain, enhance.
Static blocks would be so useful.
Static blocks would be so useful.
- medians
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
Bringing this topic up.
- TheCreatorOfUnTV
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
Yes please! -It's a bit tedious to have to do such things across sprites via broadcast-and-wait with global variables for the ‘parameters’.I think it should be implemented in a way similar to regular blocks, where that specific clone does the things it is expected to do.
One practical implementation question that comes to mind about this, though, would be concerning clones… if you have some sprite that runs a global custom block that's in some other sprite which has clones, would it be just the original sprite that runs it (in which case, you only get to work with its own local vars at that point)? Or would it be all clones as well that run it (like all clones also receive broadcasts - and which could lead to all sorts of possible unexpected behaviour for those who don't quite realise this is what happens)?
I guess a possible alternative to the local/global checkbox (if there's a reason why that isn't so easy to implement, and which doesn't have the clone question above) might be to have (the option for?) custom blocks on the stage be available to all…?
In the meantime, you could just use a list for the parameters.
- ThisIsTemp1
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
Bump becasue the topic I bumped was a dupe.

- TheCreatorOfUnTV
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
Last edited by TheCreatorOfUnTV (Aug. 8, 2024 00:47:32)
- BigNate469
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
This is a duplicate.It's currently under dispute about if that's actually suggesting the same thing. However, this topic has significantly more discussion on this, so if anything they should be merged, or the other closed.
- TheCreatorOfUnTV
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
That topic is older.This is a duplicate.It's currently under dispute about if that's actually suggesting the same thing. However, this topic has significantly more discussion on this, so if anything they should be merged, or the other closed.
- Zack_39450
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
it’s bumping bumps
From out of the bump
Bumps
No need to bump why
Just bump
And bump
It’s bumping bumps!
From out of the bump
Bumps
No need to bump why
Just bump
And bump
It’s bumping bumps!
Last edited by Zack_39450 (Aug. 24, 2024 02:31:39)
- medians
-
Scratcher
1000+ posts
Access custom blocks from all sprites (global procedures)
Bringing this topic up.
- ruvel_ztu
-
Scratcher
14 posts
Access custom blocks from all sprites (global procedures)
I fully support this suggestion. I can imagine how so many Scratchers want to have this feature but they always have to do work-arounds, which make the project slower (using message events) or more confusing (merge the scripts into one sprite). Without this and many other features, advanced programming in Scratch is much more harder than using text-based languages!
- Dangrel
-
New Scratcher
1 post
Access custom blocks from all sprites (global procedures)
It's pretty crazy to think that this thread has existed for over 10 years and global blocks are still not a thing. It would be great, obviously, but it seems that this takes way more than expected, so I would leave the topic as it is and not spend another decade bumping something that's not going to happen
- Discussion Forums
- » Suggestions
-
» Access custom blocks from all sprites (global procedures)











