Discuss Scratch

-TUB-
Scratcher
100+ posts

Change in Broadcast Source Changes Order of Broadcasts

The order of broadcasts is wrong when switching the source of broadcasts. When one of the broadcasts was received the frame before switching, that broadcast seems to run first when the source of broadcasts is changed, regardless of the order the broadcasts are sent in the new loop. Does anyone know if this behavior is intended, and why it occurs?

Here is a project demonstrating this issue: https://scratch.mit.edu/projects/929058365/

My browser / operating system: MacOS Macintosh X 10.15.7, Chrome 123.0.0.0, No Flash version detected
-TUB-
Scratcher
100+ posts

Change in Broadcast Source Changes Order of Broadcasts

bump
-TUB-
Scratcher
100+ posts

Change in Broadcast Source Changes Order of Broadcasts

bump
pawbox
Scratcher
15 posts

Change in Broadcast Source Changes Order of Broadcasts

This might be a hypothesis. When you click, the state wasn't switched yet into side loop since the code to switch it was at the bottom. The code seems to start at message 1 (main loop) and got broadcasted first.

Then it transported to the if input=1 loop. The message 1 broadcast (main loop) was still in process, so message 1 (side loop) is not in process.

And before message 2 was broadcasted, the list of message 1 (main loop) was deleted. The message 2 was broadcasted and then the message 1 (side loop).

I recommend switching the if state=menu loop at the bottom. Hope that helps :]

Powered by DjangoBB