If you get 2 points...
Synchronization using blocks 'wait' is very simple when programs are small and have few characters, but when are larger, or when we have several characters, or when conditions to generate a reaction can not be measured previously, it is more efficient to use other modes of synchronization and messages. Here's an example:
when green flag clicked
say [Hello, how are you?] for (2) secs
forever
if < touching [mouse pointer v]?>then
broadcast [catched! v]
end
when I receive [catched! v]
say [You have catched my friend] for (2) secs
say [Now, you have to catch me!] for (2) secs
How do these syncblocks work? When a situation occurs in a character we want to cause a reaction in another character, we can use messaging. In the example, when the mouse touches the cat, the message 'Caught!', which will be sent to all the characters of the project is sent. Thus, when the butterfly receives the message 'Caught!', the instructions on the block 'when receive 'caught!''. Therefore, when the user touches the cat whit the mouse, butterfly says, 'You caught my companion. Now you have to catch me!'.