Discuss Scratch
- Discussion Forums
- » Suggestions
- » Wait until [broadcast]
- xlk
-
Scratcher
100+ posts
Wait until [broadcast]
So, lets say we have a bunch of clones, that all switch to a costume that's multicoloured to detect each other, and you want them to change back. It be nice to make the code of each clone wait until a message is broadcasted to continue, so if you have a counter to count all the clones, once the last one has moved or whatever, it broadcasts said message, making all clone switch back to their original costume.
- joshuaho
-
Scratcher
1000+ posts
Wait until [broadcast]
So, lets say we have a bunch of clones, that all switch to a costume that's multicoloured to detect each other, and you want them to change back. It be nice to make the code of each clone wait until a message is broadcasted to continue, so if you have a counter to count all the clones, once the last one has moved or whatever, it broadcasts said message, making all clone switch back to their original costume.Yes! I support!

- mitchboy
-
Scratcher
1000+ posts
Wait until [broadcast]
So, lets say we have a bunch of clones, that all switch to a costume that's multicoloured to detect each other, and you want them to change back. It be nice to make the code of each clone wait until a message is broadcasted to continue, so if you have a counter to count all the clones, once the last one has moved or whatever, it broadcasts said message, making all clone switch back to their original costume.Couldn't you just use this?:
wait until (clones)>number
- xlk
-
Scratcher
100+ posts
Wait until [broadcast]
yes, but that skips a frame, making it an epileptic blinking spasm of sorts…
So, basically, something more instant.
So, basically, something more instant.
- Zparx
-
Scratcher
500+ posts
Wait until [broadcast]
Why not make a global variable, set it to 0, have a “wait until var = 1” block for all of the clones, then set it to 1 when you're ready for all of them to continue?
- blazefang21
-
Scratcher
2 posts
Wait until [broadcast]
I haven't run into this specific problem, but whenever i want a wait until block i use a variable so it's “Wait until variable=” whatever you would have named the brodcast

- Charles12310
-
Scratcher
1000+ posts
Wait until [broadcast]
(Every user has the rights to bump a SUGGESTIONS topic).
No Support, because that block would be like this:
And this Boolean:
Is rejected.
No Support, because that block would be like this:
wait until <[ v] received? :: events >
And this Boolean:
<[ v] received? :: events >
Is rejected.
- FancyFoxy
-
Scratcher
500+ posts
Wait until [broadcast]
(Every user has the rights to bump a SUGGESTIONS topic).Not necessarily. This block does not introduce ambiguity, actually. “Wait until” works because it states that it will wait until the NEXT time the broadcast is sent. Support for this.
No Support, because that block would be like this:wait until <[ v] received? :: events >
And this Boolean:<[ v] received? :: events >
Is rejected.
- AwesomeSmilee
-
Scratcher
500+ posts
Wait until [broadcast]
wait until I receive [broadcast v]::controlSupport. It's certainly easier than doing the variable thing, and it definitely isn't vague.
wait until I receive [broadcast v]::events
Last edited by AwesomeSmilee (Aug. 6, 2017 06:43:31)
- Galleigo
-
Scratcher
500+ posts
Wait until [broadcast]
So, lets say we have a bunch of clones, that all switch to a costume that's multicoloured to detect each other, and you want them to change back. It be nice to make the code of each clone wait until a message is broadcasted to continue, so if you have a counter to count all the clones, once the last one has moved or whatever, it broadcasts said message, making all clone switch back to their original costume.Rather than
when green flag clickedyou could just use
... :: grey
wait for [broadcast v] :: events
... :: grey
when green flag clicked
... :: grey
when I receive [broadcast v]
... :: grey
- Botcho_Otkho
-
Scratcher
1000+ posts
Wait until [broadcast]
Same.(Every user has the rights to bump a SUGGESTIONS topic).Not necessarily. This block does not introduce ambiguity, actually. “Wait until” works because it states that it will wait until the NEXT time the broadcast is sent. Support for this.
No Support, because that block would be like this:wait until <[ v] received? :: events >
And this Boolean:<[ v] received? :: events >
Is rejected.
So,i think support,even if this is workaroundable with variables,but it's very annoying to have a lot of variables only for sending and receiving messages.
wait until [message1 v] received::events
- Charles12310
-
Scratcher
1000+ posts
Wait until [broadcast]
Alright then. Could be useful in some instances.Same.(Every user has the rights to bump a SUGGESTIONS topic).Not necessarily. This block does not introduce ambiguity, actually. “Wait until” works because it states that it will wait until the NEXT time the broadcast is sent. Support for this.
No Support, because that block would be like this:wait until <[ v] received? :: events >
And this Boolean:<[ v] received? :: events >
Is rejected.
So,i think support,even if this is workaroundable with variables,but it's very annoying to have a lot of variables only for sending and receiving messages.wait until [message1 v] received::events
wait until broadcast [ v] received :: eventsI assume this could also be useful because it can't be passed by:
repeat until broadcast [ v] is received {
...
} :: eventsAn if block can be passed by, introducing ambiguity, unless it has an else part.- walkcycle
-
Scratcher
500+ posts
Wait until [broadcast]
I haven't run into this specific problem, but whenever i want a wait until block i use a variable so it's “Wait until variable=” whatever you would have named the brodcastYeah, use variables. Adding a new block is not necessary.
An if block can be passed by, introducing ambiguity, unless it has an else part.An if and if-else would have the same problem.
- Charles12310
-
Scratcher
1000+ posts
Wait until [broadcast]
The only exception if that if an event happens, it will either power one broadcast or the other. If one broadcast is activated, or the second broadcast is activated, it wouldn't be a problem unless a few exceptions.I haven't run into this specific problem, but whenever i want a wait until block i use a variable so it's “Wait until variable=” whatever you would have named the brodcastYeah, use variables. Adding a new block is not necessary.An if block can be passed by, introducing ambiguity, unless it has an else part.An if and if-else would have the same problem.
- Discussion Forums
- » Suggestions
-
» Wait until [broadcast]












