 mostock Registered User |
Quote
|
2023-06-15 19:36:40 |
|
I want to create something similar to MIT Scratch's broadcast system where you can use "Broadcast(some message)" block to trigger a custom event ... and then we can use "When I receive (some message)" to define what must be done when that event triggered.
|
 Guest Guest |
Quote
|
2023-06-16 06:57:08 |
|
The functionality you want to do is already available in CC. The "broadcast" is an action that sets a variable to a certain value. The "receiver" is a behavior that waits each frame for the variable to equal the value you set in the "broadcast" before doing an action(s) (which you could call an "event"). The type of variable you use can be an integer, string, true/false, etc. The terms "broadcast" and "receiver" were probably used to be more kid-friendly. I've not used Scratch other than a casual read of the documentation so I could be wrong.
|