Discuss Scratch

Supreme_Scratcher
Scratcher
26 posts

Repeat until message received block

I think it would be cool if there was a block that let you run or stop a script when a message has been broadcasted.

For example:

when green flag clicked
repeat until <message1>
move (10) steps
end



באַקאָן און געעקס און שטאָפּן

Geeks and bacon and stuff
Jerboas1224
Scratcher
100+ posts

Repeat until message received block

Would it be
<message [ v] received? :: events>
If it is, it's rejected…

Sorry, you have to wait 120 seconds between posts.
Supreme_Scratcher
Scratcher
26 posts

Repeat until message received block

Jerboas1224 wrote:

Would it be
<message [ v] received? :: events>
If it is, it's rejected…
Wait…………………………………… I can't find this anywhere in my events section…………………….





באַקאָן און געעקס און שטאָפּן

Geeks and bacon and stuff
Jerboas1224
Scratcher
100+ posts

Repeat until message received block

Supreme_Scratcher wrote:

Jerboas1224 wrote:

Would it be
<message [ v] received? :: events>
If it is, it's rejected…
Wait…………………………………… I can't find this anywhere in my events section…………………….


It's not in the editor, it's possible to color the blocks on the forums.

Sorry, you have to wait 120 seconds between posts.
Sheep_maker
Scratcher
1000+ posts

Repeat until message received block

Duplicate

Jerboas1224 wrote:

Would it be
<message [ v] received? :: events>
If it is, it's rejected…
Not necessarily! That block was rejected due to its ambiguity in if(-else) blocks, but it'd work perfectly in wait and repeat until blocks. In fact, they're typically why the block is suggested in the first place.

- Sheep_maker This is a kumquat-free signature. :P
Please don't feel the obligation to post on every single topic you see; eventually you will resort to spam.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
TheRealNetherBefore
Scratcher
1000+ posts

Repeat until message received block

There's a pretty easy workaround for this.
when I receive [message 1 v]
set [message v] to [1]
when green flag clicked
repeat until <(message) = [1]>
ysh
end

*Drinks ketchup*
Life gives me lemons but lemons give me LIFE HONEY
Small Games | Tips and Advice | Boredom Cat | Misc
Join my sci-fi RP:

G'thorpax the Unspoken
Botcho_Otkho
Scratcher
1000+ posts

Repeat until message received block

You could use variables instead of messages. No support.

IMPORTANT! READ:
Don't write things someone already said. It's useless.
If you want to point a duplicate, please don't write just “Duplicate” when you don't have the link. At least say that you can't do it because -reasons-. Writing it and then going away does not help.
Don't write “I agree”, “this” or just quote without adding something constructive. It doesn't help.
No supporting because “you can do this elsewhere” is not a valid reason. If it was, the suggestion forum wouldn't exist because you can do everything elsewhere.
A simple workaround is not, never was and will never be a reason to no-support a suggestion. There are plenty of blocks with simple workarounds in Scratch right now, and there's a reason if the ST still added them.
No supporting because “it can turn into a competition” is not a reason, since it can happen everywhere (such as follows). Post count: 1900+
Paddle2See
Scratch Team
1000+ posts

Repeat until message received block

Sheep_maker wrote:

Duplicate

Jerboas1224 wrote:

Would it be
<message [ v] received? :: events>
If it is, it's rejected…
Not necessarily! That block was rejected due to its ambiguity in if(-else) blocks, but it'd work perfectly in wait and repeat until blocks. In fact, they're typically why the block is suggested in the first place.
Thanks for the link! It does look like this is a duplicate topic so I'll close it to keep the conversation all in one place.

Please use the existing topic in the link above.

Scratch Team Member, kayak enthusiast, and servant to multiple cats.

;

Powered by DjangoBB

Standard | Mobile