Discuss Scratch

AlfabetonsOfficial
Scratcher
100+ posts

Every sprite does this

I think we should add this block:
every sprite does {
} :: control
It would make every sprite (except the stage) run the code inside it.
because lots of projects tend to have lots of sprites, and it's a pain running the same blocks to the for EVERY single one of them.
What do you think?
AlbertTheAlligator
Scratcher
5 posts

Every sprite does this

Support, I can see how this would be helpful if you have a bunch of sprites.
ScolderCreations
Scratcher
1000+ posts

Every sprite does this

There is an easy way to accomplish this, make a broadcast, then create a recieving script in one sprite. Then, drag that script to every single sprite, and you've done it. Not that difficult to do, and has the same effect.
rdococ
Scratcher
1000+ posts

Every sprite does this

ScolderCreations wrote:

There is an easy way to accomplish this, make a broadcast, then create a recieving script in one sprite. Then, drag that script to every single sprite, and you've done it. Not that difficult to do, and has the same effect.
Not if you want to make a change to that script - now you'll have to drag the old version of the script out of every sprite, and drag the new version in.

That said, I don't think this is the solution to it.
dertermenter
Scratcher
1000+ posts

Every sprite does this

Signals to all sprites should only be on the stage. I think needing every sprite doing something the same thing at the same time is quite rare, and there is an easy workaround, so I’m not sure this would be really beneficial
AlfabetonsOfficial
Scratcher
100+ posts

Every sprite does this

dertermenter wrote:

Signals to all sprites should only be on the stage. I think needing every sprite doing something the same thing at the same time is quite rare, and there is an easy workaround, so I’m not sure this would be really beneficial
But what if you needed to put motion blocks in there? The stage doesn't have any motion blocks. Also, it would be useful if you needed every sprite to move their position to make room for other sprites while remixing.
ScolderCreations
Scratcher
1000+ posts

Every sprite does this

See the thing here, is that this would make programmers too lazy. That's not a good idea, we want them to be used to doing repetitive actions, as sometimes in real programming, you will have to repeat some things in the program. That's just how it works.
dertermenter
Scratcher
1000+ posts

Every sprite does this

AlfabetonsOfficial wrote:

dertermenter wrote:

Signals to all sprites should only be on the stage. I think needing every sprite doing something the same thing at the same time is quite rare, and there is an easy workaround, so I’m not sure this would be really beneficial
But what if you needed to put motion blocks in there? The stage doesn't have any motion blocks. Also, it would be useful if you needed every sprite to move their position to make room for other sprites while remixing.
Good point actually. I would just use broadcasts

Last edited by dertermenter (Dec. 30, 2021 17:17:04)

JoshsAccount
Scratcher
100+ posts

Every sprite does this

A very watered down version of something from Snap! that would be really useful in Scratch. This block would tell all other sprites in the project to execute given blocks.
when green flag clicked
tell everyone to do {
go to [random position v]
} :: control
Possibly alternatively replace the word “everyone” with a sprite dropdown so you can choose one item?
when green flag clicked
tell [Sprite1 v] to do {
go to [random position v]
} :: control

Last edited by JoshsAccount (Oct. 2, 2021 21:08:57)

Nezon
Scratcher
1000+ posts

Every sprite does this

Last edited by Nezon (Oct. 2, 2021 22:11:48)

ItsMe-XTV-
Scratcher
100+ posts

Every sprite does this

Nezon wrote:

No support, the broadcast block does that.
It makes you have to go through EVERY sprite.
Nezon
Scratcher
1000+ posts

Every sprite does this

ItsMe-XTV- wrote:

Nezon wrote:

No support, the broadcast block does that.
It makes you have to go through EVERY sprite.
Which you can put when I receive blocks in every sprite
dimayajonelcid
Scratcher
100+ posts

Every sprite does this

ItsMe-XTV- wrote:

Nezon wrote:

No support, the broadcast block does that.
It makes you have to go through EVERY sprite.
Yes. In small projects, this may not be too bad in the cases where there are 5 sprites, but in Add Yourself remix chains, there can be like 50, and then putting broadcast blocks is very tedious.
Support, as this block is convenient.
selfexplanatory
Scratcher
100+ posts

Every sprite does this

mockups:
tell [everyone v] to do {
...
} ::control

tell [sprite v] to do {
...
} ::control
JoshsAccount
Scratcher
100+ posts

Every sprite does this

another idea i had but is probably is too complex:
tell all sprites that report <> as true to {
} :: control
_nix
Scratcher
1000+ posts

Every sprite does this

JoshsAccount wrote:

another idea i had but is probably is too complex:
tell all sprites that report <> as true to {
} :: control
That's not a bad idea, but you can put “if” blocks inside other blocks, so it has a pretty easy workaround when you use your “tell everyone to do” block

tell everyone to do {
if <> then
...
end
} :: control
ItsMe-XTV-
Scratcher
100+ posts

Every sprite does this

JoshsAccount wrote:

another idea i had but is probably is too complex:
tell all sprites that report <> as true to {
} :: control
Many true/false blocks wounds work as they report the same thing for each sprite.
JoshsAccount
Scratcher
100+ posts

Every sprite does this

you put “wounds” so im not sure what word you were trying to write

example:
when green flag clicked
tell all sprites that report <(x position) < (0)> as true to {
set x to ((x position) * (-1))
} :: control

Last edited by JoshsAccount (Oct. 3, 2021 01:41:42)

TheSingaporeBurger
New Scratcher
12 posts

Every sprite does this

I support this as I did the workaround for a complex project before, and it is extremely tedious and time-consuming.
Marc92020
Scratcher
1000+ posts

Every sprite does this

support, but when i first saw the topic, i thought it meant something else.

better block mockup:
tell [every sprite v] to{
go to [random position v]
} :: control

Powered by DjangoBB