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
Using your favourite search engine, include "site:scratch.mit.edu/discuss" in your search query to search the forums.
Don't feel obligated to post on every single suggestion; eventually you're going to support with an already-stated reason.
.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*
Check out my:
Small Games | Tips and Advice | Boredom Cats | Collab | Art
G'thorpax the Unspoken
Botcho_Otkho
Scratcher
1000+ posts

Repeat until message received block

You could use variables instead of messages. No support.

Hello! Moi is Botcho.

About me: Male / Catholic / Italian / Pizza lover / Hater of pineapple pizza / Undertale lover / Sagittarius / 13 years old / Walk-run cycles manager / Guitarist / Forum helper / Wiki Editor


Favourite games: Minecraft, Undertale My profile: click here!

Other: Donate an internet! Favourite communities: Roblox, Scratch Seasonal: nothing
;
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