Zmiany

Skocz do: nawigacji, wyszukiwania
The block starts the script when a message of the specified name selected from the drop-down list is broadcast. We define the message in the '''broadcast message''' block. Broadcasting and receiving messages enables communication between sprites as well as the stage. In this way a sprite can run the script of another sprite.
 
'''Example:'''
 
[[Plik:M_3_76.JPG]]
 
This block allows us to define and broadcast a message. We can choose the message name from the drop-down list or define a new message using the new message... option available when we expand the list.
 
[[Plik:M_3_77.JPG]]
 
A dialog box will be displayed then, in which we enter the name of the new message.
 
[[Plik:M_3_77.JPG|center]]
 
After the message has been broadcast (this block has been executed), scripts which start with '''when I receive ''message name''''' blocks are automatically triggered. The script broadcasting the message is continued simultaneously. Example: See the description of the command '''when I receive'''.
 
[[Plik:M_3_78.JPG|center]]
223
edycje