Reopen the last exercise where we made the whale cross an arc of icebergs to reach the end of the first level of the play. Remove all of the icebergs to make it easier to understand and work on this exercise. We will only allow the whale and the plane to be displayed. When the player touches the plane, the whale returns to its initial position.
- Go to File, and click on Append. Add a new iceberg:
- Choose Game Logic as the screen layout, and click on the whale to select it. You must see the whale marked in the Logic Editor panel:
- Select the whale and click Add Sensor to choose a sensor called Touch. You will also see the Keyboard sensors that were made for moving the whale (refer to Chapter 1, Things You Need to Know, to see how they were created):