Game Development Reference
In-Depth Information
Perform the following steps to iniialize the game:
1.
Start with a when I receive <game_start> block. The game_start message is
broadcasted when the Start buton is pressed.
2.
Enter 0 in the set <curr_scroll_amount> to () block.
3.
Then, enable hide .
4.
Enable the play sound <level_start> block.
5.
Then, broadcast the broadcast <level_start> message block.
6.
Enter 2 in the wait () secs block. This is to give the player a chance to take a breather
before the fast-scrolling acion.
7.
Next, broadcast the broadcast <start_scrolling> block. The brick and food sprites
will respond by staring to scroll.
To win the game, Marco or Polo has to inish the run without eaing bad food. When the last
frame has been reached, the brick sprite would send out the scroll_max_reached message.
To handle the scroll_max_reached message, perform the following steps:
1.
Start with a when I receive <scroll_max_reached> block.
2.
Enable the switch costume to <You Won> block.
3.
Enter 24 and -24 in the go to x: () y: () respecively.
4.
Then, enable show .
5.
Next, broadcast the broadcast <game_won> block.
6.
Enable the play sound <triumph> unil done block.
 
Search WWH ::




Custom Search