Broadcast blocks will broadcast a new message and will initiate a particular activity in the sprites.

Untitled

Broadcast are useful in games and animations, as they trigger specific scripts. They are similar to events, which are scripts triggered when certain actions, like mouse moves or key presses, are performed. So when a broadcast message is received, we can program to perform an action.

Untitled

Example code:

We can broadcast a message called hungry when timer is greater than 10. When the sprite receives the hungry message, we can feed the pet.

Untitled

Untitled