Discuss Scratch
- Kanyata
-
Scratcher
94 posts
Add arguments to the event blocks
What would this accomplish?
A way to transfer data across sprites without variables, and a way to associate a specific value with an event.
Why this?
It is a good alternative to setting a variable when calling an event, which can cause problems if the event is called again before the variable is read.
How would it look?
Something like this:
Multiple arguments could be used
You can adjust the amount of arguments used on the block(Unlike custom blocks, which have you set the amount of arguments when creating them.)
As of now, there are 3 supporters
A way to transfer data across sprites without variables, and a way to associate a specific value with an event.
Why this?
It is a good alternative to setting a variable when calling an event, which can cause problems if the event is called again before the variable is read.
How would it look?
Something like this:
broadcast [Event v] with Argument 1 [Hi] @delInput @addInput:: eventsOther notes
when I receive [Event v] with (Argument 1 ::events) @delInput @addInput:: events hat
say (Argument 1 ::events) for (2) secs
Multiple arguments could be used
You can adjust the amount of arguments used on the block(Unlike custom blocks, which have you set the amount of arguments when creating them.)
As of now, there are 3 supporters
Last edited by Kanyata (Nov. 11, 2025 17:10:34)
- d016
-
Scratcher
100+ posts
Add arguments to the event blocks
so something like
?
Support! This would make things easier.
broadcase [message v] with data: [hi!] :: events
when I receive [message v] with data: [local var v] :: events hat
say (local var)
?
Support! This would make things easier.
Last edited by d016 (Nov. 10, 2025 18:02:43)
- d016
-
Scratcher
100+ posts
Add arguments to the event blocks
-snip-
Something like this:broadcast [ v] with Argument 1 ()
The “Argument 1” implies that you can have more arguments:
broadcast [ v] with arguments: [input 1] [input 2] @delInput @addInput:: events
- Kanyata
-
Scratcher
94 posts
Add arguments to the event blocks
Im gonna edit the top to make it more clear.
- Quantum-Cat
-
Scratcher
1000+ posts
Add arguments to the event blocks
My first thought is that this idea is really close to global custom blocks.
But if this kind of system was to be implemented, it would be better as the events block suggested in the OP, because it is clear that blocks that influence local variables under the (when I receive broadcast block) affect the sprite they are in not the sprite they are called from.
But if this kind of system was to be implemented, it would be better as the events block suggested in the OP, because it is clear that blocks that influence local variables under the (when I receive broadcast block) affect the sprite they are in not the sprite they are called from.
- dizzyboy42
-
Scratcher
1000+ posts
Add arguments to the event blocks
support, but would there be a max argument limit? if not you could do this
broadcast [ v] with arguments: [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] @delInput @addInput :: control
- d016
-
Scratcher
100+ posts
Add arguments to the event blocks
support, but would there be a max argument limit? if not you could do thisI don't think you'ld ever need that many inputsbroadcast [ v] with arguments: [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] @delInput @addInput :: control
Even if you could just send one CSV input, broadcast arguments are supported by me!
- Kanyata
-
Scratcher
94 posts
Add arguments to the event blocks
support, but would there be a max argument limit? if not you could do thisYeah there should probably be a max, although I'm not sure what it would be.broadcast [ v] with arguments: [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] [input] @delInput @addInput :: control
- dizzyboy42
-
Scratcher
1000+ posts
Add arguments to the event blocks
Yeah there should probably be a max, although I'm not sure what it would be.I'd say 6 maybe 7 (no pun intended)
- d016
-
Scratcher
100+ posts
Add arguments to the event blocks
I feel like if there's a max people will keep suggesting “PLEASE INCREASE THE MAX BROADCAST INPUTS!!1!”Yeah there should probably be a max, although I'm not sure what it would be.I'd say 6 maybe 7 (no pun intended)
It's going to take a while to click all those arrows to get a potentialy damaging amount of inputs anyway.
- FreshTheCat
-
Scratcher
500+ posts
Add arguments to the event blocks
Also the 5mb .json limit…I feel like if there's a max people will keep suggesting “PLEASE INCREASE THE MAX BROADCAST INPUTS!!1!”Yeah there should probably be a max, although I'm not sure what it would be.I'd say 6 maybe 7 (no pun intended)
It's going to take a while to click all those arrows to get a potentially damaging amount of inputs anyway.
- d016
-
Scratcher
100+ posts
Add arguments to the event blocks
You can already reach the json limit by putting lots of blocks, and adding an event argument should only add a paragraph of data at most.Also the 5mb .json limit…I feel like if there's a max people will keep suggesting “PLEASE INCREASE THE MAX BROADCAST INPUTS!!1!”Yeah there should probably be a max, although I'm not sure what it would be.I'd say 6 maybe 7 (no pun intended)
It's going to take a while to click all those arrows to get a potentially damaging amount of inputs anyway.
I do feel like a max input limit could be like 20 or something that's not too high but hopefully almost no one will use.
- Kanyata
-
Scratcher
94 posts
Add arguments to the event blocks
What does “the 5mb .json limit” refer to?Also the 5mb .json limit…I feel like if there's a max people will keep suggesting “PLEASE INCREASE THE MAX BROADCAST INPUTS!!1!”Yeah there should probably be a max, although I'm not sure what it would be.I'd say 6 maybe 7 (no pun intended)
It's going to take a while to click all those arrows to get a potentially damaging amount of inputs anyway.
- medians
-
Scratcher
1000+ posts
Add arguments to the event blocks
What does “the 5mb .json limit” refer to?https://en.scratch-wiki.info/wiki/Scratch_File_Format
https://en.scratch-wiki.info/wiki/Project_File_Size
- DarthVader4Life
-
Scratcher
1000+ posts
Add arguments to the event blocks
I think it should be called “broadcast and send” to keep with Scratch's desire to be easily understood.
broadcast [message v] and send (var) :: events
Last edited by DarthVader4Life (Nov. 14, 2025 20:26:57)
- d016
-
Scratcher
100+ posts
Add arguments to the event blocks
I think it should be called “broadcast and send” to keep with Scratch's desire to be easily understood.Nice idea, although I feel like “broadcast” and “send” are synonyms, so then this happens:broadcast [message v] and send (var) :: events
broadcast [data v] and send [message name] :: events
I'd use “with data:” instead:
broadcast [message v] with data: [cool idea! support] :: events