Hardware Reference
In-Depth Information
4. Add the sensing block touching _ into the hexagon space on the wait until
_ control block, and use the drop-down menu to select the portal sprite, so the
block now reads wait until touching portal .
5. Next, add the control block broadcast _ and select New from the drop-down
menu. Name the new broadcast message Level .
FIGURE 3-18 Cave entrance portal sprite and script. Notice the counter block in
the top left corner of the stage.
A broadcast message is used to coordinate the actions of different sprites and
the stage. It keeps all the scripts running for each sprite and keeps the stage
synchronized. In this case, when the Adventurer sprite touches the portal, a
message called Level is broadcast. This message triggers a script for the stage to
switch to the Inside cave background that you created.
Search WWH ::




Custom Search