Hide last authors
dvd48 9.1 1 (% class="box infomessage" %)
phil_e_ux 1.1 2 (((
3 Sends a specified message to all objects and the background. The object that sends the message waits until all objects, that received the message, have finished their scripts. Then the initial script continues.
4
dvd48 32.1 5 [[image:brodcast_wait_brick3.png||alt="Broadcast and wait Brick"]]
dvd48 10.1 6 )))
phil_e_ux 1.1 7
dvd48 10.1 8 (% class="box" %)
9 (((
phil_e_ux 1.1 10 **Correlates with this brick:**
11
dvd48 20.1 12 [[[[image:when-you-receive-__.png||alt="When Your Receive Brick"]]>>doc:Documentation.BrickDocumentation.BroadcastReceiverBrick.WebHome]]
13 [[Learn more ~>~>>>doc:Documentation.BrickDocumentation.BroadcastReceiverBrick.WebHome]]
phil_e_ux 1.1 14 )))
15
dvd48 9.1 16 (% class="row" %)
17 (((
phil_e_ux 1.1 18 (% class="col-xs-12 col-sm-6" %)
19 (((
dvd48 9.1 20 (% class="box" %)
phil_e_ux 1.1 21 (((
22 ==== **Example** ====
23
24 Create two objects like:
25
26 [[image:brodcast_wait_example_1.png||alt="Broadcast and wait Example 1"]]
27
28 Tell the panda what to do when it receives the message:
29
30 [[image:brodcast_wait_example_2.png||alt="Broadcast and wait Example 2"]]
31
32 In game over take this script to specify when the message is sent and what to do when the other objects are finished with their scripts:
33
dvd48 32.1 34 [[image:brodcast_wait_4.png||alt="Broadcast and wait Example 3"]]
phil_e_ux 1.1 35
dvd48 15.1 36 **Note: select the same message in both bricks!**
phil_e_ux 1.1 37 )))
38 )))
39
40 (% class="col-xs-12 col-sm-6" %)
41 (((
dvd48 10.1 42 (% class="box" %)
phil_e_ux 1.1 43 (((
44 ==== **Result** ====
45
46 [[[[image:null4.png||alt="Download"]]>>https://share.catrob.at/pocketcode/program/34644]]
47
48 [[image:broadcast-and-wait-__-3.gif||alt="Broadcast and wait Result"]]
49 )))
50 )))
51 )))