Thank you for visiting Blazing Games

Powering the Puzzle

Implementing the shelf is fairly simple. With most of the steps involving bringing up a dialog bubble, I decided to simplify the task by taking the three lines of code that is required to set up the message and converting it into a single function call. Actually, because there is a case where a special message code is required, I wrote the following two functions to handle the poping up of the dialog. The dialog event handler (not shown) hides the dialog bubble when a dialog button is pressed.

The shelf is actually implemented using a switch statement based on the current state of the inventory box. This state reflects what item, if any, that the player is attempting to use on the shelf. Each object can only be used if the shelf is in a particular state so the shelf state is often used to determine if the shelf state is going to be changed and which message to bring to the player.

Previous page
Chapter 16 Page 5

About - Privacy Policy - Contact - Links - FAQ
Copyright © 2007 Blazing Games Inc. All Rights Reserved