Game Development Reference
Objective complete - mini debriefing
With this step, we have probably completed the most difficult part of the script. We used the
new Make a Block opion to create funcions that make script a litle easier to read and can
save work or excessive copy-pasing when creaing complex operaions.
The beginnings of a game can be visible now; the cat can be moved through the maze.
Creating a goal
Now that the cat can explore the maze, it needs a challenge. It's a good idea to give it a
specific goal to search for.
Prepare for lift off
We will draw a sprite that will be the goal for the cat to reach. What this goal will look like is
not really important. The important thing is that it is exactly 20 x 20 pixels in size, so it will it
a ile segment perfectly.
I choose to represent the goal as a "magical" warp panel consising of bright, blue rings. You
can create the same or design your own goal sprite.
Once done, name the sprite as exit . This will give us the following screenshot:
This sprite will have the same two broadcast listeners as the cat to start working. When
the maze is drawn, we will hide the sprite, and when the game starts, we will show it by
performing the following steps:
Drag the when I receive <createMaze> script from the cat and drop it on the exit
sprite to copy it there. That's the first half done.
Then, start the second script with a when I receive <startGame> block.
First, move the exit sprite to the lower-right with go to x: (230) y: (-170) block.
Then, add a repeat unil loop.
Check for the condiion not touching color <black> ?