Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Receiving multiple broadcasts
- dlowil2
-
New Scratcher
2 posts
Receiving multiple broadcasts
Hi All,
My question I have is are sprites able to receive multiple broadcasts from other sprites? If so how is this done? It is causing a bit of a problem for me at the moment.
Cheers!
My question I have is are sprites able to receive multiple broadcasts from other sprites? If so how is this done? It is causing a bit of a problem for me at the moment.
Cheers!
- ShadowScizor
-
Scratcher
100+ posts
Receiving multiple broadcasts
Have multiple receive blocks?
when I receive [ v]
- MathWizz
-
Scratcher
100+ posts
Receiving multiple broadcasts
The only restriction is that a script can only be started by a single broadcast message. Other than that, you can have as many broadcasts sent and received by each sprite as you want.
- DaGreat_49
-
New Scratcher
3 posts
Receiving multiple broadcasts
Isn't there any other way or loophole to trigger an action when multiple broadcasts are recieved?
- XCat
-
Scratcher
1000+ posts
Receiving multiple broadcasts
Another idea: make a variable and set it to y to make an action happen and n to stop it. Broadcasts can be tricky, but this method can help a lot. 
Hope this helped,
@XCat.
“There's always a way.”- @XCat

Hope this helped,
@XCat.
- drmcw
-
Scratcher
1000+ posts
Receiving multiple broadcasts
The thing that may not be obvious is what happens when you broadcast a message and the when I receive script for the message is still running? The answer is that the when I receive script is restarted. Other than that things should be straightforward. If that's not the issue perhaps you can explain what the problem is?
- Gasterwins
-
Scratcher
3 posts
Receiving multiple broadcasts
I wish they would add a way to make a certain action happen only when multiple broadcasts happened at the same time, such as a light flashing red when three different sprites do an action and send a broadcast. Such as: “When I receive (hexagon blank)” So that people could add the operation __ and __. With only one broadcast available at a time, it really limits a large number of possibilities. I was hoping they would add this block in Scratch 3.0, but sadly they never did. Does anyone have a loophole to bypass this problem, or must I re-approach my projects from a different angle? Sorry to take time out of your day for this, but I've looked everywhere and couldn't find an answer. ):
- deck26
-
Scratcher
1000+ posts
Receiving multiple broadcasts
Please start your own new topic rather than necroposting.
The key here is to use state variables to record the current state. When you make a broadcast you set that state variable and then check the other state variable to see if both are currently true.
The key here is to use state variables to record the current state. When you make a broadcast you set that state variable and then check the other state variable to see if both are currently true.
- hermione010307
-
Scratcher
2 posts
Receiving multiple broadcasts
I wish they would add a way to make a certain action happen only when multiple broadcasts happened at the same time, such as a light flashing red when three different sprites do an action and send a broadcast. Such as: “When I receive (hexagon blank)” So that people could add the operation __ and __. With only one broadcast available at a time, it really limits a large number of possibilities. I was hoping they would add this block in Scratch 3.0, but sadly they never did. Does anyone have a loophole to bypass this problem, or must I re-approach my projects from a different angle? Sorry to take time out of your day for this, but I've looked everywhere and couldn't find an answer. ):
I agree
- deck26
-
Scratcher
1000+ posts
Receiving multiple broadcasts
Please don't necropost. As I've already said you can easily work round this with variables.I wish they would add a way to make a certain action happen only when multiple broadcasts happened at the same time, such as a light flashing red when three different sprites do an action and send a broadcast. Such as: “When I receive (hexagon blank)” So that people could add the operation __ and __. With only one broadcast available at a time, it really limits a large number of possibilities. I was hoping they would add this block in Scratch 3.0, but sadly they never did. Does anyone have a loophole to bypass this problem, or must I re-approach my projects from a different angle? Sorry to take time out of your day for this, but I've looked everywhere and couldn't find an answer. ):
I agree
- hermione010307
-
Scratcher
2 posts
Receiving multiple broadcasts
Hi, I know this post is old but I searched it up today so I think that it is still relevant.
Steps
1. Make a variable for all your different broadcasts and when you broadcast set it to 1
2. Set whatever event you want and put this coding underneath (sorry to complicated to put in it's just a picture of my project) sorry couldn't upload the pic so I think it's a website
This is the website
Steps
1. Make a variable for all your different broadcasts and when you broadcast set it to 1
when I receive [ v]
set [ v] to [0]
2. Set whatever event you want and put this coding underneath (sorry to complicated to put in it's just a picture of my project) sorry couldn't upload the pic so I think it's a website
This is the website
Last edited by hermione010307 (June 20, 2019 10:17:33)
- codeman1044
-
Scratcher
1000+ posts
Receiving multiple broadcasts
-snip-This topic isn't relevant today. Usually, after a topic is over 4 months old it becomes outdated and doesn't need an answer. The only exception to this is if the topic creator adds a post to that page however much later (as long as it's still related to the topic).
What you're doing right now is a common mistake for users new to the forums. It's called necroposting, which is posting on a topic that meets the requirements above, so there's no need to post on it. This doesn't do anything for the user(s) that posted on this thread, and it can hide the threads of other users that are in need of help, as posting on a topic moves it to the top of the first page.
Last edited by codeman1044 (June 20, 2019 11:36:39)
- Yusei-Fudo
-
Scratcher
1000+ posts
Receiving multiple broadcasts
Use variables lolPlease do not necropost.
- Discussion Forums
- » Help with Scripts
-
» Receiving multiple broadcasts