Making an Interactive Treasure Map

2

Index

Stats

14,346 visits, 32,439 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 12 Jun, 2012. Last updated 19 Feb, 2019

Creating the Level Layouts

When the player clicks on a Location mask we want to go to the layout named in the instance variable Location.Layout. To create the location levels:

1. Go to the Project panel and create a new layout. When asked if you want to create an event sheet for the layout answer Yes. Name the new layout Home and rename the new event sheet Level events.

2. First create a thumbnail size version of the map sprite to use as a button to go back to the map. Go to the Home layout and insert a new instance of the Map sprite, changing its properties as follows:

Name: Map

Plugin: Sprite

Position: 40,30

Size: 76, 55

5. Insert a new Sprite object. For its graphic, right click in the Animation frames panel and import all of the frames in the graphics/feature folder. Make sure you delete first frame (frame 0) which is empty. Also change the animation Speed in the Property panel to 0. Close the animation editor and make the following changes to the sprite object:

Name: Feature

Plugin: Sprite

Position: 310, 250

Size: 510, 370

Initial Frame: 0

6. In the Layers panel, click on the layer and then change the color of the layer background to a light green. (The background colors aren't important. Making each different just makes it easier tell at a glance which level you are on.)

7. To create the next level, go to the Project panel and locate the Home layout. Right-click and choose Duplicate from the context menu. When asked if you want to add an event sheet, answer No since all of the levels will share the Level Events sheet. Name the new layout Windmill. With the layout still selected, go to the Property panel and set the Event sheet to Level Events. (Forgetting to do this is a common error!)

Also change the frame of the Feature sprite to 1 to display the Windmill graphic.

Finally, change the Background color for the layer to a yellow color.

8. Continue adding the other nine levels by duplicating them in the same way as described in step 7. You may need to resize and reposition the Feature sprite to fit the entire thing in the view. Such changes make no difference to the final result. The following figure shows a thumbnail of all 11 levels.

NOTE: Just as you didn't need to add all of the Location masks to get the project basically working, you don't need to add all of the levels. The first three or four corresponding to your Location masks will be enough to convey the idea.

  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Hi, links to .zip and .capx file are no longer valid (Dropbox error404). Any chance of an update? Thanks.